in v2/src/log_sink_callback.c [47:65]
int log_sink_callback_set_callback(LOG_SINK_CALLBACK_LOG log_callback, void* context)
{
int result;
if (log_callback == NULL)
{
/*Codes_SRS_LOG_SINK_CALLBACK_42_003: [ If log_callback is NULL then log_sink_callback_set_callback shall fail and return a non-zero value. ]*/
(void)printf("Invalid arguments: LOG_SINK_CALLBACK_LOG log_callback=%p, void* context=%p\r\n", log_callback, context);
result = MU_FAILURE;
}
else
{
/*Codes_SRS_LOG_SINK_CALLBACK_42_004: [ log_sink_callback_set_callback shall store log_callback and context so that it is used by all future calls to log_sink_callback.log. ]*/
log_sink_callback_callback = log_callback;
log_sink_callback_context = context;
/*Codes_SRS_LOG_SINK_CALLBACK_42_005: [ log_sink_callback_set_callback shall return 0. ]*/
result = 0;
}
return result;
}