Changeset 3543
- Timestamp:
- 08/16/08 16:23:59 (4 months ago)
- Location:
- trunk/opensync
- Files:
-
- 2 modified
-
client/opensync_client_proxy.c (modified) (1 diff)
-
engine/opensync_obj_engine.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/opensync/client/opensync_client_proxy.c
r3538 r3543 1028 1028 goto error; 1029 1029 1030 if (haspluginconfig) { 1031 OSyncList *r = osync_plugin_config_get_resources(config); 1032 for (; r; r = r->next) { 1033 OSyncPluginResource *res = r->data; 1034 1035 if (!osync_plugin_resource_is_enabled(res)) 1036 continue; 1037 1038 const char *objtype = osync_plugin_resource_get_objtype(res); 1039 OSyncObjTypeSink *sink = osync_client_proxy_find_objtype_sink(proxy, objtype); 1040 /* TODO: In discovery phase *sink COULD be NULL. Review if this is correct behavior. */ 1041 if (sink) { 1042 osync_objtype_sink_ref(sink); 1043 proxy->objtypes = g_list_append(proxy->objtypes, sink); 1044 } 1045 } 1046 } 1047 1030 1048 #ifdef OPENSYNC_UNITTESTS 1031 1049 // Introduced (only) for testing/debugging purpose (mock-sync) -
trunk/opensync/engine/opensync_obj_engine.c
r3365 r3543 101 101 102 102 if (osync_bitcount(engine->sink_errors | engine->sink_connects) == g_list_length(engine->sink_engines)) { 103 if (osync_bitcount(engine->sink_connects) < 2) { 104 osync_error_set(&locerror, OSYNC_ERROR_GENERIC, "Less than 2 sink_engines are connected"); 105 osync_obj_engine_set_error(engine, locerror); 106 } else if (osync_bitcount(engine->sink_errors)) { 103 if (osync_bitcount(engine->sink_errors)) { 107 104 osync_error_set(&locerror, OSYNC_ERROR_GENERIC, "At least one sink_engine failed while connecting"); 108 105 osync_obj_engine_set_error(engine, locerror); … … 721 718 722 719 osync_trace(TRACE_INTERNAL, "Loaded %i mappings", osync_mapping_table_num_mappings(engine->mapping_table)); 720 721 const char *objtype = osync_obj_engine_get_objtype(engine); 723 722 724 723 int num = osync_engine_num_proxies(engine->parent); … … 726 725 for (i = 0; i < num; i++) { 727 726 OSyncClientProxy *proxy = osync_engine_nth_proxy(engine->parent, i); 727 OSyncObjTypeSink *sink = osync_client_proxy_find_objtype_sink(proxy, objtype); 728 if (!sink) { 729 /* "data" sink engine counts also as valid. */ 730 sink = osync_client_proxy_find_objtype_sink(proxy, "data"); 731 if (!sink) 732 continue; 733 } 728 734 729 735 OSyncSinkEngine *sinkengine = osync_sink_engine_new(i, proxy, engine, error); … … 916 922 917 923 OSyncObjTypeSink *objtype_sink = osync_member_find_objtype_sink(member, engine->objtype); 924 /* If sink could not be found use "data" sink if available */ 925 if (!objtype_sink) 926 objtype_sink = osync_member_find_objtype_sink(member, "data"); 927 /* TODO: Review if objtype_sink = NULL is valid at all. */ 918 928 919 929 for (e = sinkengine->entries; e; e = e->next) {
