Changeset 3584

Show
Ignore:
Timestamp:
08/22/08 17:33:50 (3 months ago)
Author:
bellmich
Message:

If file-sync is used together with a wrong format
then an error should be signaled. The error usually
happens if an old configuration is present because
of a missing discover run.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/file-sync/src/file_sync.c

    r3563 r3584  
    171171                        osync_data_get_data(odata, &buffer, &size); 
    172172                        g_assert(buffer); 
    173                         g_assert(size == sizeof(OSyncFileFormat)); 
     173                        if (size != sizeof(OSyncFileFormat)) { 
     174                                osync_error_set(&error, OSYNC_ERROR_MISCONFIGURATION, 
     175                                        "The plugin file-sync only supports file format. Please re-configure and discover the plugin again."); 
     176                                goto error; 
     177                        } 
    174178                         
    175179                        OSyncFileFormat *file = (OSyncFileFormat *)buffer;