&prq);
cps = GNUNET_CONTAINER_multihashmap_get (connected_peers,
&other->hashPubKey);
- cps->inc_preference += CONTENT_BANDWIDTH_VALUE + 1000 * prq.priority;
- cps->trust_delta += prq.priority;
+ if (cps != NULL)
+ {
+ cps->inc_preference += CONTENT_BANDWIDTH_VALUE + 1000 * prq.priority;
+ cps->trust_delta += prq.priority;
+ }
+ else
+ {
+ GNUNET_break (0);
+ }
if (GNUNET_YES == active_migration)
{
#if DEBUG_FS
* How many messages can we have pending for a given client process
* before we start to drop incoming messages? We typically should
* have only one client and so this would be the primary buffer for
- * messages, so the number should be chosen rather generously.
+ * messages, so the number should be chosen rather generously.
*
* The expectation here is that most of the time the queue is large
* enough so that a drop is virtually never required. Note that
gettext_noop ("# HELLOs received for validation"),
1,
GNUNET_NO);
+ GNUNET_CRYPTO_hash (&publicKey,
+ sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
+ &target.hashPubKey);
/* first, check if load is too high */
if (GNUNET_SCHEDULER_get_load (sched,
GNUNET_SCHEDULER_PRIORITY_BACKGROUND) > MAX_HELLO_LOAD)
GNUNET_break_op (0);
return GNUNET_SYSERR;
}
- GNUNET_CRYPTO_hash (&publicKey,
- sizeof (struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded),
- &target.hashPubKey);
if (0 == memcmp (&my_identity,
&target,
sizeof (struct GNUNET_PeerIdentity)))
{
GNUNET_SCHEDULER_cancel (session->plugin->env->sched,
session->receive_delay_task);
- GNUNET_SERVER_receive_done (session->client,
- GNUNET_SYSERR);
+ if (session->client != NULL)
+ GNUNET_SERVER_receive_done (session->client,
+ GNUNET_SYSERR);
}
- GNUNET_SERVER_client_drop (session->client);
+ if (session->client != NULL)
+ GNUNET_SERVER_client_drop (session->client);
GNUNET_STATISTICS_update (session->plugin->env->stats,
gettext_noop ("# TCP sessions active"),
-1,