gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r17371 - gnunet/src/core


From: gnunet
Subject: [GNUnet-SVN] r17371 - gnunet/src/core
Date: Tue, 11 Oct 2011 14:33:07 +0200

Author: grothoff
Date: 2011-10-11 14:33:07 +0200 (Tue, 11 Oct 2011)
New Revision: 17371

Modified:
   gnunet/src/core/gnunet-service-core_clients.c
Log:
make client with an empty list of handlers count as having a handler for *all* 
message types

Modified: gnunet/src/core/gnunet-service-core_clients.c
===================================================================
--- gnunet/src/core/gnunet-service-core_clients.c       2011-10-11 12:19:45 UTC 
(rev 17370)
+++ gnunet/src/core/gnunet-service-core_clients.c       2011-10-11 12:33:07 UTC 
(rev 17371)
@@ -190,6 +190,8 @@
 {
   unsigned int i;
 
+  if (c->tcnt == 0)
+    return GNUNET_YES; /* peer without handlers matches ALL */
   for (i=0;i<c->tcnt;i++)
     if (type == c->types[i])
       return GNUNET_YES;
@@ -622,6 +624,8 @@
 
   old_match = GSC_TYPEMAP_test_match (tmap_old, client->types, client->tcnt);
   new_match = GSC_TYPEMAP_test_match (tmap_new, client->types, client->tcnt);
+  if (client->tcnt == 0)
+    new_match = GNUNET_YES; /* empty list matches ALL */
   if (old_match == new_match)
     return; /* no change */
   if (old_match == GNUNET_NO)




reply via email to

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