commit fd5398d409529c5ea61c8f347f22872c24e8f7bf
parent 8634a2f7c40019f2c47ef6e7f16dc4609cda762d
Author: Michael Rasmussen <mir@datanom.net>
Date: Sun, 18 Dec 2011 19:07:49 +0000
2011-12-18 [mir] 3.8.0cvs4
* src/ldapctrl.c
Fix bug in search criteria when doing a
complete directory search using '*'
Diffstat:
4 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-18 [mir] 3.8.0cvs4
+
+ * src/ldapctrl.c
+ Fix bug in search criteria when doing a
+ complete directory search using '*'
+
2011-12-16 [mir] 3.8.0cvs3
* src/Makefile.am
diff --git a/PATCHSETS b/PATCHSETS
@@ -4320,3 +4320,4 @@
( cvs diff -u -r 1.1.2.25 -r 1.1.2.26 tools/claws.i18n.status.pl; ) > 3.8.0cvs1.patchset
( cvs diff -u -r 1.150.2.119 -r 1.150.2.120 src/procmsg.c; cvs diff -u -r 1.25.2.72 -r 1.25.2.73 src/stock_pixmap.c; cvs diff -u -r 1.18.2.42 -r 1.18.2.43 src/stock_pixmap.h; cvs diff -u -r 1.395.2.441 -r 1.395.2.442 src/summaryview.c; cvs diff -u -r 1.1.2.20 -r 1.1.2.21 src/gtk/icon_legend.c; diff -u /dev/null src/pixmaps/replied_and_forwarded.xpm; ) > 3.8.0cvs2.patchset
( cvs diff -u -r 1.155.2.97 -r 1.155.2.98 src/Makefile.am; ) > 3.8.0cvs3.patchset
+( cvs diff -u -r 1.2.2.23 -r 1.2.2.24 src/ldapctrl.c; ) > 3.8.0cvs4.patchset
diff --git a/configure.ac b/configure.ac
@@ -12,7 +12,7 @@ MINOR_VERSION=8
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=3
+EXTRA_VERSION=4
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/ldapctrl.c b/src/ldapctrl.c
@@ -632,8 +632,15 @@ gchar *ldapctl_format_criteria( LdapControl *ctl, const gchar *searchVal ) {
/* Subsequent time through */
gchar *crit;
- /* Format query criteria */
- crit = g_strdup_printf( criteriaFmt, attr, searchVal );
+ debug_print("crit: %s\n", searchVal);
+ /* fix bug when doing a search any */
+ if (strcmp("*@", searchVal) == 0) {
+ crit = g_strdup_printf( "(%s=*)", attr );
+ }
+ else {
+ /* Format query criteria */
+ crit = g_strdup_printf( criteriaFmt, attr, searchVal );
+ }
/* Append to existing criteria */
g_free( p2 );
@@ -643,7 +650,13 @@ gchar *ldapctl_format_criteria( LdapControl *ctl, const gchar *searchVal ) {
}
else {
/* First time through - Format query criteria */
- p2 = g_strdup_printf( criteriaFmt, attr, searchVal );
+ /* fix bug when doing a search any */
+ if (strcmp("*@", searchVal) == 0) {
+ p2 = g_strdup_printf( "(%s=*)", attr );
+ }
+ else {
+ p2 = g_strdup_printf( criteriaFmt, attr, searchVal );
+ }
}
}