aboutsummaryrefslogtreecommitdiff
path: root/src/core/gnunet-service-core_clients.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/gnunet-service-core_clients.c')
-rw-r--r--src/core/gnunet-service-core_clients.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/core/gnunet-service-core_clients.c b/src/core/gnunet-service-core_clients.c
index b57936baa..200f15c8e 100644
--- a/src/core/gnunet-service-core_clients.c
+++ b/src/core/gnunet-service-core_clients.c
@@ -223,16 +223,18 @@ send_to_all_clients (const struct GNUNET_PeerIdentity *partner,
223 uint32_t options, uint16_t type) 223 uint32_t options, uint16_t type)
224{ 224{
225 struct GSC_Client *c; 225 struct GSC_Client *c;
226 int tm;
226 227
227 for (c = client_head; c != NULL; c = c->next) 228 for (c = client_head; c != NULL; c = c->next)
228 { 229 {
230 tm = type_match (type, c);
229 if (! ( (0 != (c->options & options)) || 231 if (! ( (0 != (c->options & options)) ||
230 ( (0 != (options & GNUNET_CORE_OPTION_SEND_FULL_INBOUND)) && 232 ( (0 != (options & GNUNET_CORE_OPTION_SEND_FULL_INBOUND)) &&
231 (GNUNET_YES == type_match (type, c)) ) ) ) 233 (GNUNET_YES == tm) ) ) )
232 continue; /* neither options nor type match permit the message */ 234 continue; /* neither options nor type match permit the message */
233 if ( (0 != (options & GNUNET_CORE_OPTION_SEND_HDR_INBOUND)) && 235 if ( (0 != (options & GNUNET_CORE_OPTION_SEND_HDR_INBOUND)) &&
234 ( (0 != (c->options & GNUNET_CORE_OPTION_SEND_FULL_INBOUND)) || 236 ( (0 != (c->options & GNUNET_CORE_OPTION_SEND_FULL_INBOUND)) ||
235 (GNUNET_YES == type_match (type, c)) ) ) 237 (GNUNET_YES == tm) ) )
236 continue; 238 continue;
237 if ( (0 != (options & GNUNET_CORE_OPTION_SEND_HDR_OUTBOUND)) && 239 if ( (0 != (options & GNUNET_CORE_OPTION_SEND_HDR_OUTBOUND)) &&
238 (0 != (c->options & GNUNET_CORE_OPTION_SEND_FULL_OUTBOUND)) ) 240 (0 != (c->options & GNUNET_CORE_OPTION_SEND_FULL_OUTBOUND)) )
@@ -242,9 +244,11 @@ send_to_all_clients (const struct GNUNET_PeerIdentity *partner,
242 options, 244 options,
243 ntohs (msg->size), 245 ntohs (msg->size),
244 (unsigned int) type); 246 (unsigned int) type);
245 GNUNET_assert (GNUNET_YES == 247 GNUNET_assert ( (0 == (c->options & GNUNET_CORE_OPTION_SEND_FULL_INBOUND)) ||
246 GNUNET_CONTAINER_multihashmap_contains (c->connectmap, 248 (GNUNET_YES != tm) ||
247 &partner->hashPubKey)); 249 (GNUNET_YES ==
250 GNUNET_CONTAINER_multihashmap_contains (c->connectmap,
251 &partner->hashPubKey)) );
248 send_to_client (c, msg, can_drop); 252 send_to_client (c, msg, can_drop);
249 } 253 }
250} 254}