Changeset 3404

Show
Ignore:
Timestamp:
07/07/08 10:00:36 (2 months ago)
Author:
dgollub
Message:

Update initialze_connect_error function for latest initialize API.
No need to register or allocate new ObjTypeSinks? if the Config already
provided those. This leads to duplicate ObjTypeSinks? which break the
testcase by using the wrong Sink with wrong sink functions.

TODO: review more instrumted initialize functions if they
register/allocate new ObjTypesSinks?.

TODO: Allow only registration of uniq ObjTypeSinks?, to avoid double
configuration of sinks.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tests/engine-tests/check_engine_error.c

    r3398 r3404  
    121121 
    122122        mock_env *env = osync_try_malloc0(sizeof(mock_env), error); 
    123         if (!env) 
    124                 goto error; 
    125  
    126         OSyncObjTypeSink *sink = osync_objtype_sink_new("mockobjtype1", error); 
    127         if (!sink) 
    128                 goto error; 
    129          
    130         OSyncObjFormatSink *formatsink = osync_objformat_sink_new("mockobjtype1", error); 
     123        osync_assert(env); 
     124 
     125        OSyncObjTypeSink *sink = osync_plugin_info_nth_objtype(info, 0); 
     126        osync_assert(sink); 
     127         
     128        OSyncObjFormatSink *formatsink = osync_objformat_sink_new("mockformat1", error); 
    131129        osync_objtype_sink_add_objformat_sink(sink, formatsink); 
    132130         
     
    143141        osync_trace(TRACE_EXIT, "%s: %p", __func__, env); 
    144142        return (void *)env; 
    145  
    146 error: 
    147         osync_trace(TRACE_EXIT_ERROR, "%s: %s", __func__, osync_error_print(error)); 
    148         return NULL; 
    149143} 
    150144