[Commits] ldapctrl.c 1.2.2.23 1.2.2.24

miras at claws-mail.org miras at claws-mail.org
Sun Dec 18 20:07:50 CET 2011


Update of /home/claws-mail/claws/src
In directory claws-mail:/tmp/cvs-serv14429/src

Modified Files:
      Tag: gtk2
	ldapctrl.c 
Log Message:
2011-12-18 [mir]	3.8.0cvs4

	* src/ldapctrl.c
	    Fix bug in search criteria when doing a
	    complete directory search using '*'

Index: ldapctrl.c
===================================================================
RCS file: /home/claws-mail/claws/src/ldapctrl.c,v
retrieving revision 1.2.2.23
retrieving revision 1.2.2.24
diff -u -d -r1.2.2.23 -r1.2.2.24
--- ldapctrl.c	16 Feb 2011 07:16:05 -0000	1.2.2.23
+++ ldapctrl.c	18 Dec 2011 19:07:48 -0000	1.2.2.24
@@ -632,8 +632,15 @@
 			/* 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 @@
 		}
 		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 );
+			}
 		}
 	}
 



More information about the Commits mailing list