Changeset 3563

Show
Ignore:
Timestamp:
08/18/08 20:35:23 (4 months ago)
Author:
dgollub
Message:

Add sanity check for "file" format. Currently "file" only supports this
format.

TODO: Move this sanity check into the framework.

Files:
1 modified

Legend:

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

    r3511 r3563  
    496496                } 
    497497 
     498                OSyncList *s = osync_plugin_resource_get_objformat_sinks(res); 
     499                for (; s; s = s->next) { 
     500                        OSyncObjFormatSink *fsink = s->data; 
     501                        const char *objformat = osync_objformat_sink_get_objformat(fsink); 
     502                        assert(objformat); 
     503                         
     504                        /* TODO: Implement objformat sanity check in OpenSync Core */  
     505                        if (strcmp(objformat, "file")) { 
     506                                osync_error_set(error, OSYNC_ERROR_MISCONFIGURATION, "Format \"%s\" is not supported by file-sync. Only Format \"file\" is currently supported by the file-sync plugin.", objformat); 
     507                                goto error_free_env; 
     508                        } 
     509 
     510                } 
     511 
    498512                /* All sinks have the same functions of course */ 
    499513                OSyncObjTypeSinkFunctions functions;