Sync ldap with HEAD
authorColin Leroy <colin@colino.net>
Sat, 24 Jul 2004 14:15:23 +0000 (14:15 +0000)
committerColin Leroy <colin@colino.net>
Sat, 24 Jul 2004 14:15:23 +0000 (14:15 +0000)
ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/browseldap.c
src/ldapctrl.c
src/ldapctrl.h
src/ldapserver.h

index cd65b206feeb4c72b5fd66fc2152da98818f23b5..50799c6a5af8df1876ee07ebe1151f54889617cc 100644 (file)
@@ -1,3 +1,12 @@
+2004-07-24 [colin]     0.9.12cvs33.19
+
+       * src/browseldap.c
+       * src/ldapctrl.c
+       * src/ldapctrl.h
+       * src/ldapserver.h
+               Sync ldap with HEAD
+       (Fixes 546 LDAP completely broken)
+
 2004-07-24 [colin]     0.9.12cvs33.18
 
        * src/prefs_msg_colors.c
 2004-07-24 [colin]     0.9.12cvs33.18
 
        * src/prefs_msg_colors.c
index e302ca140178627bd0a87b8a1ab3685267a3896b..ac6d526984f40a697de349ec147c6fb5abc229b0 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
@@ -72,3 +72,4 @@
 ( cvs diff -u -r 1.382.2.32 -r 1.382.2.33 src/compose.c; ) > 0.9.12cvs33.16.patchset
 ( cvs diff -u -r 1.274.2.11 -r 1.274.2.12 src/mainwindow.c; ) > 0.9.12cvs33.17.patchset
 ( cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_msg_colors.c; ) > 0.9.12cvs33.18.patchset
 ( cvs diff -u -r 1.382.2.32 -r 1.382.2.33 src/compose.c; ) > 0.9.12cvs33.16.patchset
 ( cvs diff -u -r 1.274.2.11 -r 1.274.2.12 src/mainwindow.c; ) > 0.9.12cvs33.17.patchset
 ( cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_msg_colors.c; ) > 0.9.12cvs33.18.patchset
+( cvs diff -u -r 1.2.4.2 -r 1.2.4.3 src/browseldap.c; cvs diff -u -r 1.2.2.1 -r 1.2.2.2 src/ldapctrl.c; cvs diff -u -r 1.1.4.1 -r 1.1.4.2 src/ldapctrl.h; cvs diff -u -r 1.2.2.1 -r 1.2.2.2 src/ldapserver.h; ) > 0.9.12cvs33.19.patchset
index ca3e08529618d863cc3bc279bea688f1922b481a..621e263e059552c6eb2ffc2b7b517d8b2d08f217 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=33
 EXTRA_RELEASE=
 BINARY_AGE=0
 EXTRA_VERSION=33
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.18
+EXTRA_GTK2_VERSION=.19
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index 7bbd1480bfbcdf9e2166750c8ab20ad8650a0d6f..e2e5ab0a88a24a36f11a107215573a29fc6de013 100644 (file)
@@ -232,7 +232,7 @@ static void browse_create( void ) {
        GtkWidget *statusbar;
        gint top;
 
        GtkWidget *statusbar;
        gint top;
 
-       window = gtk_window_new(GTK_WINDOW_DIALOG);
+       window = gtk_dialog_new();
        gtk_widget_set_usize( window, BROWSELDAP_WIDTH, BROWSELDAP_HEIGHT );
        gtk_container_set_border_width( GTK_CONTAINER(window), 0 );
        gtk_window_set_title( GTK_WINDOW(window), _("Browse Directory Entry") );
        gtk_widget_set_usize( window, BROWSELDAP_WIDTH, BROWSELDAP_HEIGHT );
        gtk_container_set_border_width( GTK_CONTAINER(window), 0 );
        gtk_window_set_title( GTK_WINDOW(window), _("Browse Directory Entry") );
index 391694b392a17204ccd81cbde7ff3b0ddd6a94df..74e52175303d7c625baec30c5ce4247b9f692780 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003 Match Grun
+ * Copyright (C) 2003-2004 Match Grun
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -56,6 +56,8 @@ LdapControl *ldapctl_create( void ) {
        ctl->timeOut = LDAPCTL_DFL_TIMEOUT;
        ctl->maxQueryAge = LDAPCTL_DFL_QUERY_AGE;
        ctl->matchingOption = LDAPCTL_MATCH_BEGINWITH;
        ctl->timeOut = LDAPCTL_DFL_TIMEOUT;
        ctl->maxQueryAge = LDAPCTL_DFL_QUERY_AGE;
        ctl->matchingOption = LDAPCTL_MATCH_BEGINWITH;
+       ctl->version = 0;
+       ctl->enableTLS = FALSE;
 
        /* Mutex to protect control block */
        ctl->mutexCtl = g_malloc0( sizeof( pthread_mutex_t ) );
 
        /* Mutex to protect control block */
        ctl->mutexCtl = g_malloc0( sizeof( pthread_mutex_t ) );
@@ -184,6 +186,15 @@ void ldapctl_set_matching_option( LdapControl* ctl, const gint value ) {
        }
 }
 
        }
 }
 
+/**
+ * Specify TLS option.
+ * \param ctl   Control object to process.
+ * \param value <i>TRUE</i> to enable TLS.
+ */
+void ldapctl_set_tls( LdapControl* ctl, const gboolean value ) {
+       ctl->enableTLS = value;
+}
+
 /**
  * Specify search criteria list to be used.
  * \param ctl   Control data object.
 /**
  * Specify search criteria list to be used.
  * \param ctl   Control data object.
@@ -282,6 +293,8 @@ void ldapctl_clear( LdapControl *ctl ) {
        ctl->timeOut = 0;
        ctl->maxQueryAge = 0;
        ctl->matchingOption = LDAPCTL_MATCH_BEGINWITH;
        ctl->timeOut = 0;
        ctl->maxQueryAge = 0;
        ctl->matchingOption = LDAPCTL_MATCH_BEGINWITH;
+       ctl->version = 0;
+       ctl->enableTLS = FALSE;
 }
 
 /**
 }
 
 /**
@@ -323,6 +336,8 @@ void ldapctl_default_values( LdapControl *ctl ) {
        ctl->timeOut = LDAPCTL_DFL_TIMEOUT;
        ctl->maxQueryAge = LDAPCTL_DFL_QUERY_AGE;
        ctl->matchingOption = LDAPCTL_MATCH_BEGINWITH;
        ctl->timeOut = LDAPCTL_DFL_TIMEOUT;
        ctl->maxQueryAge = LDAPCTL_DFL_QUERY_AGE;
        ctl->matchingOption = LDAPCTL_MATCH_BEGINWITH;
+       ctl->version = 0;
+       ctl->enableTLS = FALSE;
 
        ldapctl_default_attributes( ctl );
 }
 
        ldapctl_default_attributes( ctl );
 }
@@ -350,6 +365,8 @@ void ldapctl_print( const LdapControl *ctl, FILE *stream ) {
        fprintf( stream, "  timeout: %d\n",   ctl->timeOut );
        fprintf( stream, "  max age: %d\n",   ctl->maxQueryAge );
        fprintf( stream, "match opt: %d\n",   ctl->matchingOption );
        fprintf( stream, "  timeout: %d\n",   ctl->timeOut );
        fprintf( stream, "  max age: %d\n",   ctl->maxQueryAge );
        fprintf( stream, "match opt: %d\n",   ctl->matchingOption );
+       fprintf( stream, "  version: %d\n",   ctl->version );
+       fprintf( stream, "      TLS: %s\n",   ctl->enableTLS ? "yes" : "no" );
        fprintf( stream, "crit list:\n" );
        if( ctl->listCriteria ) {
                mgu_print_dlist( ctl->listCriteria, stream );
        fprintf( stream, "crit list:\n" );
        if( ctl->listCriteria ) {
                mgu_print_dlist( ctl->listCriteria, stream );
@@ -403,6 +420,8 @@ void ldapctl_copy( const LdapControl *ctlFrom, LdapControl *ctlTo ) {
        ctlTo->timeOut = ctlFrom->timeOut;
        ctlTo->maxQueryAge = ctlFrom->maxQueryAge;
        ctlTo->matchingOption = ctlFrom->matchingOption;
        ctlTo->timeOut = ctlFrom->timeOut;
        ctlTo->maxQueryAge = ctlFrom->maxQueryAge;
        ctlTo->matchingOption = ctlFrom->matchingOption;
+       ctlTo->version = ctlFrom->version;
+       ctlTo->enableTLS = ctlFrom->enableTLS;
 
        /* Unlock */
        pthread_mutex_unlock( ctlTo->mutexCtl );
 
        /* Unlock */
        pthread_mutex_unlock( ctlTo->mutexCtl );
index 568e90d7e67b3ecccc580f5f7d0a4a56e63d3449..cf36e3646d46e8c89a00244e8e61cf73694c3190 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003 Match Grun
+ * Copyright (C) 2003-2004 Match Grun
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -66,6 +66,8 @@ struct _LdapControl {
        gint      timeOut;
        gint      maxQueryAge;
        gint      matchingOption;
        gint      timeOut;
        gint      maxQueryAge;
        gint      matchingOption;
+       gint      version;
+       gboolean  enableTLS;
        gchar     *attribEMail;
        gchar     *attribCName;
        gchar     *attribFName;
        gchar     *attribEMail;
        gchar     *attribCName;
        gchar     *attribFName;
@@ -85,6 +87,7 @@ void ldapctl_set_max_entries  ( LdapControl* ctl, const gint value );
 void ldapctl_set_timeout       ( LdapControl* ctl, const gint value );
 void ldapctl_set_max_query_age ( LdapControl* ctl, const gint value );
 void ldapctl_set_matching_option( LdapControl* ctl, const gint value );
 void ldapctl_set_timeout       ( LdapControl* ctl, const gint value );
 void ldapctl_set_max_query_age ( LdapControl* ctl, const gint value );
 void ldapctl_set_matching_option( LdapControl* ctl, const gint value );
+void ldapctl_set_tls           ( LdapControl* ctl, const gboolean value );
 void ldapctl_set_criteria_list ( LdapControl* ctl, GList *value );
 GList *ldapctl_get_criteria_list( const LdapControl* ctl );
 void ldapctl_criteria_list_clear( LdapControl *ctl );
 void ldapctl_set_criteria_list ( LdapControl* ctl, GList *value );
 GList *ldapctl_get_criteria_list( const LdapControl* ctl );
 void ldapctl_criteria_list_clear( LdapControl *ctl );
index 21a64f5d68900355978200fbce32e710ac73ff35..d5223272f33d849bef0586b4d5fefb9340e0b28e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003 Match Grun
+ * Copyright (C) 2003-2004 Match Grun
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -44,6 +44,7 @@
 #define LDAPRC_CRITERIA   -6
 #define LDAPRC_NOENTRIES  -7
 #define LDAPRC_STOP_FLAG  -8
 #define LDAPRC_CRITERIA   -6
 #define LDAPRC_NOENTRIES  -7
 #define LDAPRC_STOP_FLAG  -8
+#define LDAPRC_TLS        -9
 
 typedef struct _LdapServer LdapServer;
 struct _LdapServer {
 
 typedef struct _LdapServer LdapServer;
 struct _LdapServer {