+2010-12-17 [colin] 3.7.8cvs6
+
+ * src/addressadd.c
+ * src/addressbook.c
+ * src/addrindex.c
+ * src/ldapquery.c
+ * src/ldapquery.h
+ * src/ldapserver.c
+ * src/ldapserver.h
+ * src/ldapupdate.c
+ * src/ldaputil.c
+ * src/ldaputil.h
+ Windows build fixes (w32 LDAP completely untested!)
+
2010-12-16 [colin] 3.7.8cvs5
* src/addrindex.c
( cvs diff -u -r 1.43.2.85 -r 1.43.2.86 src/prefs_matcher.c; ) > 3.7.8cvs3.patchset
( cvs diff -u -r 1.5.2.40 -r 1.5.2.41 src/prefs_spelling.c; cvs diff -u -r 1.9.2.49 -r 1.9.2.50 src/common/defs.h; ) > 3.7.8cvs4.patchset
( cvs diff -u -r 1.28.2.44 -r 1.28.2.45 src/addrindex.c; cvs diff -u -r 1.8.2.37 -r 1.8.2.38 src/editldap.c; cvs diff -u -r 1.2.2.21 -r 1.2.2.22 src/ldapctrl.c; cvs diff -u -r 1.3.2.34 -r 1.3.2.35 src/ldapquery.c; cvs diff -u -r 1.4.2.18 -r 1.4.2.19 src/ldapserver.c; cvs diff -u -r 1.2.2.11 -r 1.2.2.12 src/ldapserver.h; cvs diff -u -r 1.1.2.24 -r 1.1.2.25 src/ldapupdate.c; cvs diff -u -r 1.1.4.16 -r 1.1.4.17 src/ldaputil.c; ) > 3.7.8cvs5.patchset
+( cvs diff -u -r 1.9.2.30 -r 1.9.2.31 src/addressadd.c; cvs diff -u -r 1.60.2.138 -r 1.60.2.139 src/addressbook.c; cvs diff -u -r 1.28.2.45 -r 1.28.2.46 src/addrindex.c; cvs diff -u -r 1.3.2.35 -r 1.3.2.36 src/ldapquery.c; cvs diff -u -r 1.4.2.13 -r 1.4.2.14 src/ldapquery.h; cvs diff -u -r 1.4.2.19 -r 1.4.2.20 src/ldapserver.c; cvs diff -u -r 1.2.2.12 -r 1.2.2.13 src/ldapserver.h; cvs diff -u -r 1.1.2.25 -r 1.1.2.26 src/ldapupdate.c; cvs diff -u -r 1.1.4.17 -r 1.1.4.18 src/ldaputil.c; cvs diff -u -r 1.1.4.9 -r 1.1.4.10 src/ldaputil.h; ) > 3.7.8cvs6.patchset
MICRO_VERSION=8
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=5
+EXTRA_VERSION=6
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
AC_MSG_RESULT(no - LDAP support needs pthread support)
ac_cv_enable_ldap=no
+elif test x"$platform_win32" = xyes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_LDAP, 1, Define if you want LDAP support in addressbook.)
+ AC_DEFINE(USE_LDAP_TLS, 1, Define if you want LDAP TLS support in addressbook.)
+ LDAP_LIBS="-lwldap32"
+ AC_SUBST(LDAP_LIBS)
else
AC_MSG_RESULT(yes)
gtk_cmclist_clear( GTK_CMCLIST( tree ) );
list = addrindex_get_interface_list( addrIndex );
while( list ) {
- AddressInterface *interface = list->data;
- if( interface->type == ADDR_IF_BOOK ||
- interface->type == ADDR_IF_LDAP ) {
- nodeDS = interface->listSource;
+ AddressInterface *ainterface = list->data;
+ if( ainterface->type == ADDR_IF_BOOK ||
+ ainterface->type == ADDR_IF_LDAP ) {
+ nodeDS = ainterface->listSource;
while( nodeDS ) {
ds = nodeDS->data;
dsName = g_strdup( addrindex_ds_get_name( ds ) );
#include "expldifdlg.h"
#include "browseldap.h"
#include "addrcustomattr.h"
-
+#ifdef G_OS_WIN32
+#undef interface
+#endif
typedef enum
{
COL_SOURCES = 0,
#include "ldaputil.h"
#endif
+#ifdef G_OS_WIN32
+#undef interface
+#endif
+
#define TAG_ADDRESS_INDEX "addressbook"
#define TAG_IF_ADDRESS_BOOK "book_list"
#include <glib.h>
#include <sys/time.h>
#include <string.h>
-#include <lber.h>
#include "defs.h"
#include "ldaputil.h"
qry = ( LdapQuery * ) ptr;
cm_return_if_fail( qry != NULL );
- debug_print("ldapqry_destroyer::%d::%s\n", (int) pthread_self(),
- ADDRQUERY_NAME(qry)?ADDRQUERY_NAME(qry):"null");
-
/* Perform any destruction here */
if( qry->control != NULL ) {
ldapctl_free( qry->control );
void ldapqry_cancel( LdapQuery *qry ) {
cm_return_if_fail( qry != NULL );
- debug_print("cancelling::%d::%s\n", (int) pthread_self(),
- ADDRQUERY_NAME(qry)?ADDRQUERY_NAME(qry):"null");
if( ldapqry_get_busy_flag( qry ) ) {
if( qry->thread ) {
debug_print("calling pthread_cancel\n");
#include <stdio.h>
#include <sys/time.h>
#include <pthread.h>
-#include <ldap.h>
+#ifdef G_OS_UNIX
+#include <ldap.h>
+#include <lber.h>
+#else
+#include <windows.h>
+#include <winldap.h>
+#endif
#include "addrquery.h"
#include "ldapctrl.h"
#include "addritem.h"
#include <glib.h>
#include <sys/time.h>
#include <string.h>
-#include <ldap.h>
-#include <lber.h>
#include "mgutils.h"
#include "addritem.h"
void ldapsrv_set_options (gint secs, LDAP *ld)
{
static struct timeval timeout;
- int i = LDAP_OPT_X_TLS_ALLOW;
int rc;
+ int i;
timeout.tv_sec = secs;
timeout.tv_usec = 0;
+#ifdef G_OS_UNIX
+ i = LDAP_OPT_X_TLS_ALLOW;
rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &i);
debug_print("cert %s\n", ldap_err2string(rc));
-
/* can crash old libldaps... */
rc = ldap_set_option(NULL, LDAP_OPT_NETWORK_TIMEOUT, &timeout);
debug_print("tm %s\n", ldap_err2string(rc));
-
+#else
+ rc = ldap_set_option(NULL, LDAP_OPT_TIMELIMIT, &secs);
+ debug_print("tm %s\n", ldap_err2string(rc));
+#endif
}
/**
uri = g_strdup_printf("ldap%s://%s:%d",
ctl->enableSSL?"s":"",
ctl->hostName, ctl->port);
+#ifdef G_OS_UNIX
ldap_initialize(&ld, uri);
+#else
+ ld = ldap_sslinit(ctl->hostName, ctl->port, ctl->enableSSL);
+#endif
g_free(uri);
if (ld == NULL)
#ifdef USE_LDAP
#include <glib.h>
+#ifdef G_OS_UNIX
#include <ldap.h>
+#else
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <errno.h>
+#include <windows.h>
+#include <winldap.h>
+#include <winber.h>
+#endif
#include "ldapctrl.h"
#include "addritem.h"
#include <glib/gi18n.h>
#include <sys/time.h>
#include <string.h>
-#include <ldap.h>
-#include <lber.h>
#include "ldapupdate.h"
#include "mgutils.h"
#include <glib.h>
#include <string.h>
#include <sys/time.h>
-#include <ldap.h>
-#include <lber.h>
#include <errno.h>
#include "common/utils.h"
+#include "ldaputil.h"
#include "ldapserver.h"
#include "ldapctrl.h"
}
debug_print("binding: DN->%s\n", dn?dn:"null");
+#ifdef G_OS_UNIX
return ldap_sasl_bind_s( ld, dn, LDAP_SASL_SIMPLE, &cred,
NULL, NULL, NULL );
+#else
+ return ldap_simple_bind_s(ld, dn, passwd);
+#endif
}
/**
if (baseDN)
debug_print("Using LDAP v3\n");
+#ifdef G_OS_UNIX
if( baseDN == NULL && !LDAP_API_ERROR(rc) ) {
+#else
+ if( baseDN == NULL) {
+#endif
baseDN = ldaputil_test_v2( ld, tov );
if (baseDN)
debug_print("Using LDAP v2\n");
#ifdef USE_LDAP
#include <glib.h>
+#ifdef G_OS_UNIX
#include <ldap.h>
+#include <lber.h>
+#else
+#include <windows.h>
+#include <winldap.h>
+#define LDAP_CONST const
+#define ldap_unbind_ext(ld,x,y) ldap_unbind_s(ld)
+#define LDAP_ADMINLIMIT_EXCEEDED LDAP_ADMIN_LIMIT_EXCEEDED
+#define timeval l_timeval
+#endif
/* Function Prototypes */
GList *ldaputil_read_basedn ( const gchar *host, const gint port,
const gchar *bindDN, const gchar *bindPW,