gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r7160 - GNUnet/src/applications/fs/fsui


From: gnunet
Subject: [GNUnet-SVN] r7160 - GNUnet/src/applications/fs/fsui
Date: Thu, 12 Jun 2008 12:25:43 -0600 (MDT)

Author: grothoff
Date: 2008-06-12 12:25:43 -0600 (Thu, 12 Jun 2008)
New Revision: 7160

Modified:
   GNUnet/src/applications/fs/fsui/search.c
Log:
fix

Modified: GNUnet/src/applications/fs/fsui/search.c
===================================================================
--- GNUnet/src/applications/fs/fsui/search.c    2008-06-12 18:19:15 UTC (rev 
7159)
+++ GNUnet/src/applications/fs/fsui/search.c    2008-06-12 18:25:43 UTC (rev 
7160)
@@ -205,6 +205,16 @@
   return GNUNET_OK;
 }
 
+static int
+count_mandatory_keywords (const char *keyword, int is_mandatory, void *closure)
+{
+  struct GNUNET_FSUI_SearchList *pos = closure;
+
+  if (is_mandatory)
+    pos->mandatory_keyword_count++;
+  return GNUNET_OK;
+}
+
 /**
  * This function is called on each keyword in the
  * search list.  Start the corresponding ECRS search.
@@ -226,8 +236,6 @@
                                                       1, &keyword);
   GNUNET_hash (keyword, strlen (keyword), &srl->key);
   srl->is_required = is_mandatory;
-  if (is_mandatory)
-    pos->mandatory_keyword_count++;
   srl->next = pos->searches;
   pos->searches = srl;
   srl->search =
@@ -288,6 +296,7 @@
   if (GNUNET_ECRS_uri_test_ksk (uri))
     {
       /* (possibly boolean) keyword search */
+      GNUNET_ECRS_uri_get_keywords_from_ksk (uri, &count_mandatory_keywords, 
pos);
       GNUNET_ECRS_uri_get_keywords_from_ksk (uri, &create_ecrs_search, pos);
       if (pos->start_time == 0)
         {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]