From: <svn...@op...> - 2010-02-28 17:39:45
|
Author: scriptor Date: Sun Feb 28 18:39:36 2010 New Revision: 6043 URL: http://www.opensync.org/changeset/6043 Log: Comments, minor changes. Modified: plugins/ldap-sync/CMakeLists.txt plugins/ldap-sync/src/CMakeLists.txt plugins/ldap-sync/src/ldap_format.c plugins/ldap-sync/src/ldap_plugin.c Modified: plugins/ldap-sync/CMakeLists.txt ============================================================================== --- plugins/ldap-sync/CMakeLists.txt Sun Feb 28 18:39:19 2010 (r6042) +++ plugins/ldap-sync/CMakeLists.txt Sun Feb 28 18:39:36 2010 (r6043) @@ -450,7 +450,7 @@ ########################################################################## ## Packaging -SET(CPACK_SOURCE_IGNORE_FILES "/Testing/;tags;/obsolete/;build;build_debug;svn_;/CVS/;/\\.svn/;\\.swp$;.*~;") +SET(CPACK_SOURCE_IGNORE_FILES "/Testing/;tags;/obsolete/;build;build_debug;build_windows;svn_;/CVS/;/[.]svn/;[.]swp$;.*~;") OPENSYNC_PACKAGE( ${PROJECT_NAME} ${VERSION} ) # vim:tw=0:nowrap Modified: plugins/ldap-sync/src/CMakeLists.txt ============================================================================== --- plugins/ldap-sync/src/CMakeLists.txt Sun Feb 28 18:39:19 2010 (r6042) +++ plugins/ldap-sync/src/CMakeLists.txt Sun Feb 28 18:39:36 2010 (r6043) @@ -30,13 +30,13 @@ ENDIF ( NOT _LDAP_INCLUDE_DIRS ) IF ( NOT _LDAP_LIBRARY_DIRS ) - MESSAGE( FATAL ERROR " _LDAP_LIBRARY_DIRS could not be determined. The build process of the ldap-sync plugin must know where to find the ldap libraries.") + MESSAGE( FATAL_ERROR " _LDAP_LIBRARY_DIRS could not be determined. The build process of the ldap-sync plugin must know where to find the ldap libraries.") ELSE ( NOT _LDAP_LIBRARY_DIRS ) MESSAGE( STATUS "_LDAP_LIBRARY_DIRS = \"${_LDAP_LIBRARY_DIRS}\"" ) ENDIF ( NOT _LDAP_LIBRARY_DIRS ) IF ( NOT _LDAP_LIBRARIES ) - MESSAGE( FATAL ERROR " _LDAP_LIBRARIES could not be determined. The build process of the ldap-sync plugin requires the ldap library.") + MESSAGE( FATAL_ERROR " _LDAP_LIBRARIES could not be determined. The build process of the ldap-sync plugin requires the ldap library.") ELSE ( NOT _LDAP_LIBRARIES ) MESSAGE( STATUS "_LDAP_LIBRARIES = \"${_LDAP_LIBRARIES}\"" ) ENDIF ( NOT _LDAP_LIBRARIES ) Modified: plugins/ldap-sync/src/ldap_format.c ============================================================================== --- plugins/ldap-sync/src/ldap_format.c Sun Feb 28 18:39:19 2010 (r6042) +++ plugins/ldap-sync/src/ldap_format.c Sun Feb 28 18:39:36 2010 (r6043) @@ -2874,7 +2874,9 @@ osync_trace(TRACE_INTERNAL, "%s:%i: xmlformat = %p", __FILE__, __LINE__, (void *)xmlformat); osync_trace(TRACE_INTERNAL, "%s:%i: This needs to be freed eventually. But by whom? And where and when exactly?", __FILE__, __LINE__); - + // To answer this question: One possibility is the call of + // osync_xmlformat_unref() in ldap_format_osync_xml_format2ldap_entries() + #ifdef DEBUG_apply_stylesheet ldap_plugin_printf("%s:%i: ---------- </osync_xmlformat_parse()> -----------", __FILE__, __LINE__); Modified: plugins/ldap-sync/src/ldap_plugin.c ============================================================================== --- plugins/ldap-sync/src/ldap_plugin.c Sun Feb 28 18:39:19 2010 (r6042) +++ plugins/ldap-sync/src/ldap_plugin.c Sun Feb 28 18:39:36 2010 (r6043) @@ -838,13 +838,16 @@ continue; } + if (name[0] == 0) { + osync_trace(TRACE_ERROR, "%s:%i: ERROR: name[0] = 0. Skipping this entry.\n", __FILE__, __LINE__); + continue; + } if (val == NULL) { osync_trace(TRACE_ERROR, "%s:%i: ERROR: val = NULL. Skipping this entry.\n", __FILE__, __LINE__); continue; } - if (!strcmp(name, "binddn")) sinkenv->binddn = g_strdup(val); @@ -4635,12 +4638,17 @@ /** * @brief This function finishes the whole ldap-sync plugin. * - * @param userdata ??????? + * @param userdata The plugin specific environment is here passed as + * void-pointer. plugin_env has been allocated in + * ldap_plugin_initialize(). * * @returns Nothing */ void ldap_plugin_finalize(void *userdata) { + osync_trace(TRACE_INTERNAL, "%s:%i:%s(): userdata = %p", __FILE__, __LINE__, __func__, userdata); + + plugin_environment *plugin_env = (plugin_environment *)userdata; if (plugin_env == NULL) { |