Extra check on suggestion string and punctuation in debug to see end
authorDennis Schafroth <dennis@indexdata.com>
Tue, 21 Aug 2012 14:41:56 +0000 (16:41 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Tue, 21 Aug 2012 14:41:56 +0000 (16:41 +0200)
src/client.c

index 56f927d..ba9bab4 100644 (file)
@@ -1429,11 +1429,11 @@ struct suggestions* client_suggestions_create(const char* suggestions_string)
     int i;
     NMEM nmem;
     struct suggestions *suggestions;
-    if (suggestions_string == 0)
+    if (suggestions_string == 0 || suggestions_string[0] == 0 )
         return 0;
     nmem = nmem_create();
     suggestions = nmem_malloc(nmem, sizeof(*suggestions));
-    yaz_log(YLOG_DEBUG, "client target suggestions: %s", suggestions_string);
+    yaz_log(YLOG_DEBUG, "client target suggestions: %s.", suggestions_string);
 
     suggestions->nmem = nmem;
     suggestions->num = 0;