fix
authorChristian Grothoff <christian@grothoff.org>
Tue, 11 Oct 2011 12:19:45 +0000 (12:19 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 11 Oct 2011 12:19:45 +0000 (12:19 +0000)
src/core/gnunet-service-core_clients.c

index 838fa42db9db47582b81798676e4488a47c2e546..6caacb002697f56b90fdec7c55123e395a89b108 100644 (file)
@@ -216,13 +216,15 @@ send_to_all_clients (const struct GNUNET_MessageHeader *msg,
 
   for (c = client_head; c != NULL; c = c->next)
   {
-    if (! ( (0 != (c->options & options)) ||
-           ( (0 != (options & GNUNET_CORE_OPTION_SEND_FULL_INBOUND)) &&
-             (GNUNET_YES == type_match (type, c)) ) ) )
-      continue; /* skip */
+    if ( (0 == (options & GNUNET_CORE_OPTION_SEND_FULL_INBOUND)) &&
+        (GNUNET_YES == type_match (type, c)) )
+      continue; /* not the full message, but we'd like the full one! */
+    if ( (0 == (c->options & options)) &&
+        (GNUNET_YES != type_match (type, c)) )
+      continue; /* neither options nor type match permit the message */
 #if DEBUG_CORE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-               "Sending message to all clients interested in messages of type %u.\n",
+               "Sending message to client interested in messages of type %u.\n",
                (unsigned int) type);
 #endif
     send_to_client (c, msg, can_drop);