From: <svn...@op...> - 2009-10-21 17:03:22
|
Author: scriptor Date: Wed Oct 21 19:03:09 2009 New Revision: 5877 URL: http://www.opensync.org/changeset/5877 Log: I have corrected some error and trace messages. Modified: plugins/ldap-sync/src/ldap_format.c plugins/ldap-sync/src/ldap_plugin.c Modified: plugins/ldap-sync/src/ldap_format.c ============================================================================== --- plugins/ldap-sync/src/ldap_format.c Wed Oct 21 19:02:39 2009 (r5876) +++ plugins/ldap-sync/src/ldap_format.c Wed Oct 21 19:03:09 2009 (r5877) @@ -1380,12 +1380,12 @@ if (child_name == NULL) { - osync_trace(TRACE_ERROR, "%s:%i: ERROR: child_name = NULL. Ignoring this node.\n", __FILE__, __LINE__); + osync_trace(TRACE_ERROR, "%s:%i: WARNING: child_name = NULL. Ignoring this node.\n", __FILE__, __LINE__); continue; } if (child_name[0] == 0) { - osync_trace(TRACE_ERROR, "%s:%i: ERROR: child_name[0] = 0. Ignoring this node.\n", __FILE__, __LINE__); + osync_trace(TRACE_ERROR, "%s:%i: WARNING: child_name[0] = 0. Ignoring this node.\n", __FILE__, __LINE__); continue; } @@ -1398,13 +1398,13 @@ if (child_value == NULL) { - osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: child_value = NULL. Ignoring this node with child_name = \"%s\"\n", __FILE__, __LINE__, child_name); + osync_trace(TRACE_ERROR, "%s:%i: WARNING: child_value = NULL. Ignoring this node with child_name = \"%s\"\n", __FILE__, __LINE__, child_name); continue; } if (child_value[0] == 0) { - osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: child_value[0] = 0. Ignoring this node with child_name = \"%s\"\n", __FILE__, __LINE__, child_name); + osync_trace(TRACE_ERROR, "%s:%i: WARNING: child_value[0] = 0. Ignoring this node with child_name = \"%s\"\n", __FILE__, __LINE__, child_name); continue; } @@ -4117,12 +4117,12 @@ } if (value == NULL) { - osync_trace(TRACE_ERROR, "%s:%i: ERROR: value = NULL. Skipping this xmlnode.\n", __FILE__, __LINE__); + osync_trace(TRACE_ERROR, "%s:%i: WARNING: value = NULL. Skipping this xmlnode. name = \"%s\".\n", __FILE__, __LINE__, (char *)name ? (char *)name : "NULL"); continue; } if (value[0] == 0) { - osync_trace(TRACE_ERROR, "%s:%i: ERROR: value[0] = 0.\n", __FILE__, __LINE__); + osync_trace(TRACE_ERROR, "%s:%i: WARNING: value[0] = 0. Skipping this xmlnode. name = \"%s\".\n", __FILE__, __LINE__, (char *)name ? (char *)name : "NULL"); if (value) { xmlFree(value); value = NULL; Modified: plugins/ldap-sync/src/ldap_plugin.c ============================================================================== --- plugins/ldap-sync/src/ldap_plugin.c Wed Oct 21 19:02:39 2009 (r5876) +++ plugins/ldap-sync/src/ldap_plugin.c Wed Oct 21 19:03:09 2009 (r5877) @@ -3542,12 +3542,12 @@ * @brief This is a helper function for ldap_plugin_commit_modification(). * It looks for any modifications that are to be made on the LDAP * server's side from the perspective of the peer, i.e. it starts - * from the list of LDAP entries received as "change". + * with the list of LDAP entries received as "change". * * @param ctx The libopensync context. * @param sinkenv The plugin specific environment. * @param ldap_entries A list of LDAP entries which have changed and which - * need to change on the LDAP server side. + * need to be changed on the LDAP server side. * @param id_of_modified_entry This is the identifier ("uid=...") of the LDAP * entry that is to be modified. * @param dn_of_modified_entry This is not just the identifier, but the @@ -3562,10 +3562,10 @@ osync_bool ldap_plugin_commit_modification_from_server_s_view(OSyncContext *ctx, sink_environment *sinkenv, GList *ldap_entries, char **id_of_modified_entry, char **dn_of_modified_entry, char **hash, OSyncError **error) { - osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p)", __func__, ctx, sinkenv, ldap_entries, error); + osync_trace(TRACE_ENTRY, "%s(%p, %p, %p, %p, %p, %p, %p)", __func__, ctx, sinkenv, ldap_entries, id_of_modified_entry, dn_of_modified_entry, hash, error); - if (ldap_entries == NULL) { + if (ldap_entries == NULL) { osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: ldap_entries = NULL.\n", __FILE__, __LINE__); goto error; } @@ -3575,14 +3575,11 @@ goto error; } - - if (dn_of_modified_entry == NULL) { osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: dn_of_modified_entry = NULL.\n", __FILE__, __LINE__); goto error; } - if (hash == NULL) { osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: hash = NULL.\n", __FILE__, __LINE__); goto error; @@ -3781,7 +3778,7 @@ * @param sinkenv The plugin specific environment. * @param change The change object. * @param ldap_entries A list of LDAP entries which have changed and which - * need to change on the LDAP server side. + * need to be changed on the LDAP server side. * @param result As a result of this function this variable gets filled with * libldap errno: * LDAP_SUCCESS on success, @@ -3841,7 +3838,6 @@ goto error; } - if (result == NULL) { osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: result is NULL.", __FILE__, __LINE__); goto error; |