From: <svn...@op...> - 2009-04-04 21:51:06
|
Author: scriptor Date: Sat Apr 4 23:51:02 2009 New Revision: 5537 URL: http://www.opensync.org/changeset/5537 Log: Workaround for a bug in osyncplugin: osyncplugin loads format plugins in the same way as sync plugins. Thus it expects a "get_sync_info" function. Which is wrong for format plugins. In order to prevent corresponding exit errors, I have added a function "get_sync_info" to the format plugin without any functionality, just to pretend that there is such a symbol. This silences the exit errors about a missing "get_sync_info" function. Modified: plugins/ldap-sync/src/ldap_format.c Modified: plugins/ldap-sync/src/ldap_format.c ============================================================================== --- plugins/ldap-sync/src/ldap_format.c Sat Apr 4 23:50:08 2009 (r5536) +++ plugins/ldap-sync/src/ldap_format.c Sat Apr 4 23:51:02 2009 (r5537) @@ -6439,6 +6439,30 @@ #endif +/** + * @brief This function exists just because of bugs in osyncplugin: + * osyncplugin loads format plugins in the same way as + * sync plugins, thus erroneously assuming that there + * must be a get_sync_info() function. Which is wrong, + * of course: get_conversion_info() is it, rather. + * So this function is nothing else but a workaround with + * no further purpose. + * + * @param env The environment for the whole plugin. + * @param error The libopensync error pointer. + * + * @returns Always TRUE. + * + */ +osync_bool get_sync_info(OSyncPluginEnv *env, OSyncError **error) +{ + osync_trace(TRACE_ENTRY, "%s(%p, %p)", __func__, env, error); + ldap_plugin_printf("%s:%i: \n\n\nget_sync_info() in the LDAP format plugin (!) has been called. This function exists just because of bugs in osyncplugin.", __FILE__, __LINE__); + + osync_trace(TRACE_EXIT, "%s", __func__); + return TRUE; +} + /* @} */ |