GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY);
destroy_msg->cid = cc->cid;
}
- GCP_request_mq_cancel (cc->mq_man,
- env);
- cc->mq_man = NULL;
+ if (NULL != cc->mq_man)
+ {
+ GCP_request_mq_cancel (cc->mq_man,
+ env);
+ cc->mq_man = NULL;
+ }
if (NULL != cc->task)
{
GNUNET_SCHEDULER_cancel (cc->task);
struct GNUNET_MQ_Envelope *env;
struct GNUNET_CADET_ConnectionBrokenMessage *bm;
+ if (NULL == target->mqm)
+ return; /* Can't send notification, connection is down! */
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Notifying %s about BROKEN route at %s-%s of connection %s\n",
GCP_2s (target->hop),
bm->peer1 = *peer1;
if (NULL != peer2)
bm->peer2 = *peer2;
+
GCP_request_mq_cancel (target->mqm,
env);
target->mqm = NULL;