[Commits] [SCM] claws branch, gtk2, updated. 3.19.1-21-g731e75ba1
mones at claws-mail.org
mones at claws-mail.org
Thu Dec 15 12:33:41 UTC 2022
The branch, gtk2 has been updated
via 731e75ba1b123d9e1b26ac0279f3adeb8d924346 (commit)
from 56ea75979429fd746248096548ca49ff18a2da59 (commit)
Summary of changes:
configure.ac | 12 ++++++++++++
src/addrindex.c | 4 +++-
src/ldapctrl.c | 7 ++++---
src/ldapctrl.h | 7 ++++---
src/ldapquery.c | 16 +++++++++++-----
src/ldapquery.h | 7 ++++---
src/ldapserver.c | 16 +++++++++-------
src/ldapserver.h | 7 ++++---
8 files changed, 51 insertions(+), 25 deletions(-)
- Log -----------------------------------------------------------------
commit 731e75ba1b123d9e1b26ac0279f3adeb8d924346
Author: Ricardo Mones <ricardo at mones.org>
Date: Thu Dec 15 13:27:14 2022 +0100
Exclude LDAP debug functions unless requested
Cherry-picked from 8aaf0276c11cecaca09672e440c421df2e0b2e22
diff --git a/configure.ac b/configure.ac
index b455eff85..b24cd26fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -345,6 +345,10 @@ AC_ARG_ENABLE(addressbook-debug,
[ --enable-addressbook-debug Build with addressbook debug calls],
[enable_addressbook_debug=$enableval], [enable_addressbook_debug=no])
+AC_ARG_ENABLE(ldap-debug,
+ [ --enable-ldap-debug Build with LDAP debug calls],
+ [enable_ldap_debug=$enableval], [enable_ldap_debug=no])
+
manualdir='${docdir}/manual'
AC_ARG_WITH(manualdir,
[ --with-manualdir=DIR Manual directory],
@@ -1070,6 +1074,14 @@ else
AC_MSG_RESULT(no)
fi
+AC_MSG_CHECKING([whether to build LDAP debug calls])
+if test x$enable_ldap_debug = xyes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(DEBUG_LDAP, 1, [Define if you want LDAP debug calls])
+else
+ AC_MSG_RESULT(no)
+fi
+
dnl *************************
dnl ** section for plugins **
dnl *************************
diff --git a/src/addrindex.c b/src/addrindex.c
index 1508f014d..da6b85420 100644
--- a/src/addrindex.c
+++ b/src/addrindex.c
@@ -1460,7 +1460,9 @@ static AddressDataSource *addrindex_parse_ldap( XMLFile *file ) {
}
g_free( criteria );
}
- /* ldapsvr_print_data( server, stdout ); */
+#ifdef DEBUG_LDAP
+ ldapsvr_print_data( server, stdout );
+#endif
return ds;
}
diff --git a/src/ldapctrl.c b/src/ldapctrl.c
index 3bf8acecf..fc36ce07d 100644
--- a/src/ldapctrl.c
+++ b/src/ldapctrl.c
@@ -1,6 +1,6 @@
/*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003-2021 the Claws Mail team and Match Grun
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2003-2022 the Claws Mail team and 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
@@ -14,7 +14,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
/*
@@ -322,6 +321,7 @@ void ldapctl_free( LdapControl *ctl ) {
g_free( ctl );
}
+#ifdef DEBUG_LDAP
/**
* Display object to specified stream.
* \param ctl Control object to process.
@@ -363,6 +363,7 @@ void ldapctl_print( const LdapControl *ctl, FILE *stream ) {
}
pthread_mutex_unlock( ctl->mutexCtl );
}
+#endif
/**
* Copy member variables to specified object. Mutex lock object is
diff --git a/src/ldapctrl.h b/src/ldapctrl.h
index 41673618b..39841b41d 100644
--- a/src/ldapctrl.h
+++ b/src/ldapctrl.h
@@ -1,6 +1,6 @@
/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003-2012 Match Grun and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2003-2022 Match Grun and the Claws Mail team
*
* 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
@@ -14,7 +14,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
/*
@@ -99,7 +98,9 @@ GList *ldapctl_get_criteria_list( const LdapControl* ctl );
void ldapctl_criteria_list_clear( LdapControl *ctl );
void ldapctl_criteria_list_add ( LdapControl *ctl, gchar *attr );
void ldapctl_free ( LdapControl *ctl );
+#ifdef DEBUG_LDAP
void ldapctl_print ( const LdapControl *ctl, FILE *stream );
+#endif
void ldapctl_copy ( const LdapControl *ctlFrom,
LdapControl *ctlTo );
gchar *ldapctl_format_criteria ( LdapControl *ctl, const gchar *searchVal );
diff --git a/src/ldapquery.c b/src/ldapquery.c
index f79959908..17f3e3e68 100644
--- a/src/ldapquery.c
+++ b/src/ldapquery.c
@@ -1,6 +1,6 @@
/*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003-2018 Match Grun and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2003-2022 Match Grun and the Claws Mail team
*
* 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
@@ -695,13 +695,17 @@ static gint ldapqry_connect( LdapQuery *qry ) {
/* Initialize connection */
if (debug_get_mode()) {
debug_print("===ldapqry_connect===\n");
- /*ldapqry_print(qry, stdout);*/
+#ifdef DEBUG_LDAP
+ ldapqry_print(qry, stdout);
+#endif
}
ctl = qry->control;
- /*if (debug_get_mode()) {
+#ifdef DEBUG_LDAP
+ if (debug_get_mode()) {
ldapctl_print(ctl, stdout);
debug_print("======\n");
- }*/
+ }
+#endif
ldapqry_touch( qry );
qry->startTime = qry->touchTime;
qry->elapsedTime = -1;
@@ -1348,6 +1352,7 @@ gboolean ldapquery_remove_results( LdapQuery *qry ) {
return retVal;
}
+#ifdef DEBUG_LDAP
void ldapqry_print(LdapQuery *qry, FILE *stream) {
cm_return_if_fail( qry != NULL );
@@ -1363,6 +1368,7 @@ void ldapqry_print(LdapQuery *qry, FILE *stream) {
fprintf(stream, "touchTime: %d\n", (int) qry->touchTime);
fprintf(stream, "data: %s\n", qry->data?(gchar *)qry->data:"null");
}
+#endif
#endif /* USE_LDAP */
diff --git a/src/ldapquery.h b/src/ldapquery.h
index 46a757d93..b9b82885f 100644
--- a/src/ldapquery.h
+++ b/src/ldapquery.h
@@ -1,6 +1,6 @@
/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003-2012 Match Grun and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2003-2022 Match Grun and the Claws Mail team
*
* 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
@@ -14,7 +14,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
/*
@@ -74,7 +73,9 @@ struct _NameValuePair {
};
/* Function prototypes */
+#ifdef DEBUG_LDAP
void ldapqry_print(LdapQuery *qry, FILE *stream);
+#endif
void ldapqry_initialize ( void );
LdapQuery *ldapqry_create ( void );
void ldapqry_set_control ( LdapQuery *qry, LdapControl *ctl );
diff --git a/src/ldapserver.c b/src/ldapserver.c
index fec392cb3..a14968370 100644
--- a/src/ldapserver.c
+++ b/src/ldapserver.c
@@ -1,6 +1,6 @@
/*
- * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003-2021 the Claws Mail team and Match Grun
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2003-2022 the Claws Mail team and 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
@@ -119,11 +119,11 @@ gint ldapsvr_get_status( LdapServer *server ) {
*/
ItemFolder *ldapsvr_get_root_folder( LdapServer *server ) {
cm_return_val_if_fail( server != NULL, NULL );
- /*
- g_print( "ldapsvr_get_root_folder/start\n" );
+#ifdef DEBUG_LDAP
+ debug_print( "ldapsvr_get_root_folder/start\n" );
ldapsvr_print_data( server, stdout );
- g_print( "ldapsvr_get_root_folder/done\n" );
- */
+ debug_print( "ldapsvr_get_root_folder/done\n" );
+#endif
return addrcache_get_root_folder( server->addressCache );
}
@@ -277,10 +277,11 @@ void ldapsvr_free( LdapServer *server ) {
g_free( server );
}
+#ifdef DEBUG_LDAP
/**
* Display object to specified stream.
* \param server Server object.
- * \param stream Output stream.
+ * \param stream Output stream.
*/
void ldapsvr_print_data( LdapServer *server, FILE *stream ) {
GList *node;
@@ -311,6 +312,7 @@ void ldapsvr_print_data( LdapServer *server, FILE *stream ) {
node = g_list_next( node );
}
}
+#endif
/**
* Return link list of persons.
diff --git a/src/ldapserver.h b/src/ldapserver.h
index 4b68eae42..73ff9ec92 100644
--- a/src/ldapserver.h
+++ b/src/ldapserver.h
@@ -1,6 +1,6 @@
/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003-2012 Match Grun and the Claws Mail team
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+ * Copyright (C) 2003-2022 Match Grun and the Claws Mail team
*
* 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
@@ -14,7 +14,6 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
/*
@@ -91,7 +90,9 @@ gboolean ldapsvr_get_search_flag( LdapServer *server );
void ldapsvr_set_search_flag ( LdapServer *server, const gboolean value );
gint ldapsvr_read_data ( LdapServer *server );
+#ifdef DEBUG_LDAP
void ldapsvr_print_data ( LdapServer *server, FILE *stream );
+#endif
void ldapsvr_cancel_read ( LdapServer *server );
ItemFolder *ldapsvr_get_root_folder ( LdapServer *server );
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list