From: <svn...@op...> - 2009-03-30 15:11:10
|
Author: dgollub Date: Mon Mar 30 17:10:59 2009 New Revision: 5465 URL: http://www.opensync.org/changeset/5465 Log: Ported ldap-sync to OSyncAnchor key=value API change. refs #1090 Modified: plugins/ldap-sync/src/ldap_plugin.c Modified: plugins/ldap-sync/src/ldap_plugin.c ============================================================================== --- plugins/ldap-sync/src/ldap_plugin.c Mon Mar 30 17:06:09 2009 (r5464) +++ plugins/ldap-sync/src/ldap_plugin.c Mon Mar 30 17:10:59 2009 (r5465) @@ -410,7 +410,7 @@ } - timestamp = osync_anchor_retrieve(anchor, error); + timestamp = osync_anchor_retrieve(anchor, "latest_timestamp", error); if (timestamp) { osync_trace(TRACE_INTERNAL, "Latest timestamp in anchordb is: %s (objtype: \"%s\")\n", timestamp, osync_objtype_sink_get_name(sinkenv->sink)); @@ -428,7 +428,7 @@ if (sinkenv->latest_timestamp && sinkenv->latest_timestamp[0]) { - if (!osync_anchor_compare(anchor, sinkenv->latest_timestamp, &anchor_match, error)) { + if (!osync_anchor_compare(anchor, "latest_timestamp", sinkenv->latest_timestamp, &anchor_match, error)) { if (!osync_error_is_set(error)) { osync_error_set(error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: osync_anchor_compare() has failed.", __FILE__, __LINE__); } @@ -4015,7 +4015,7 @@ goto error; } - if (!osync_anchor_update(anchor, sinkenv->latest_timestamp, &error)) { + if (!osync_anchor_update(anchor, "latest_timestamp", sinkenv->latest_timestamp, &error)) { if (!osync_error_is_set(&error)) { osync_error_set(&error, OSYNC_ERROR_GENERIC, "%s:%i: ERROR: osync_anchor_update() has failed.\n", __FILE__, __LINE__); } @@ -4107,7 +4107,7 @@ if (anchor == NULL) { osync_trace(TRACE_ERROR, "%s:%i: ERROR: anchor = NULL for objtype \"%s\". Ignoring for now.\n", __FILE__, __LINE__, osync_objtype_sink_get_name(sinkenv->sink)); } else { - timestamp = osync_anchor_retrieve(anchor, error); + timestamp = osync_anchor_retrieve(anchor, "latest_timestamp", error); #ifdef DEBUG_anchor ldap_plugin_printf("%s:%i: osync_anchor_retrieve() returned: \"%s\"", __FILE__, __LINE__, timestamp ? timestamp : "NULL"); #endif |