From: <svn...@op...> - 2009-04-11 18:29:06
|
Author: scriptor Date: Sat Apr 11 20:29:02 2009 New Revision: 5577 URL: http://www.opensync.org/changeset/5577 Log: Fixed some error messages. The glist_container struct has a new member: format_name. To be used in the detector functions of the format plugin. Modified: plugins/ldap-sync/src/ldap_plugin.c Modified: plugins/ldap-sync/src/ldap_plugin.c ============================================================================== --- plugins/ldap-sync/src/ldap_plugin.c Sat Apr 11 20:28:51 2009 (r5576) +++ plugins/ldap-sync/src/ldap_plugin.c Sat Apr 11 20:29:02 2009 (r5577) @@ -251,22 +251,22 @@ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p, %p)", __func__, ctx, sink, userdata, sinkenv, error); if (ctx == NULL) { - osync_error_set(error, OSYNC_ERROR_GENERIC, "ERROR: ctx = NULL.", __FILE__, __LINE__); + osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: ctx = NULL.", __FILE__, __LINE__); goto error; } if (sink == NULL) { - osync_error_set(error, OSYNC_ERROR_GENERIC, "ERROR: sink = NULL.", __FILE__, __LINE__); + osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: sink = NULL.", __FILE__, __LINE__); goto error; } if (userdata == NULL) { - osync_error_set(error, OSYNC_ERROR_GENERIC, "ERROR: userdata = NULL.", __FILE__, __LINE__); + osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: userdata = NULL.", __FILE__, __LINE__); goto error; } if (sinkenv == NULL) { - osync_error_set(error, OSYNC_ERROR_GENERIC, "ERROR: sinkenv = NULL.", __FILE__, __LINE__); + osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: sinkenv = NULL.", __FILE__, __LINE__); goto error; } @@ -1248,7 +1248,9 @@ /** * @brief This function formally reports a single change that is to be performed - * by any peer to the libopensync framework. + * by any peer to the libopensync framework. This is one of two + * locations in the LDAP plugin where a glist_container is generated. + * See also ldap_format_do_conv_xmlformat_to_ldap() in ldap_format.c. * * * @param ctx The libopensync context. @@ -1453,6 +1455,7 @@ } to_be_reported->magic = "glist_container"; + to_be_reported->format_name = osync_objformat_get_name(format_type); to_be_reported->list = list_to_be_reported; char *ptr = (char *)to_be_reported; ptr[sizeof(glist_container)] = 0; |