diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-01-23 14:57:36 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-01-23 14:57:36 +0100 |
commit | b25a64c10b76c48ce1eda6bc923ff40a82f0a673 (patch) | |
tree | ec7f6b70e9b54ad3304950dea345dfcd1a543c25 /src/cadet/gnunet-service-cadet-new_core.c | |
parent | ec8163cd85687197d910bd668960af800e9fe8ef (diff) | |
download | gnunet-b25a64c10b76c48ce1eda6bc923ff40a82f0a673.tar.gz gnunet-b25a64c10b76c48ce1eda6bc923ff40a82f0a673.zip |
handle case of MQM being already NULL
Diffstat (limited to 'src/cadet/gnunet-service-cadet-new_core.c')
-rw-r--r-- | src/cadet/gnunet-service-cadet-new_core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_core.c b/src/cadet/gnunet-service-cadet-new_core.c index 1e35a5102..8de780ce0 100644 --- a/src/cadet/gnunet-service-cadet-new_core.c +++ b/src/cadet/gnunet-service-cadet-new_core.c | |||
@@ -312,6 +312,8 @@ send_broken (struct RouteDirection *target, | |||
312 | struct GNUNET_MQ_Envelope *env; | 312 | struct GNUNET_MQ_Envelope *env; |
313 | struct GNUNET_CADET_ConnectionBrokenMessage *bm; | 313 | struct GNUNET_CADET_ConnectionBrokenMessage *bm; |
314 | 314 | ||
315 | if (NULL == target->mqm) | ||
316 | return; /* Can't send notification, connection is down! */ | ||
315 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 317 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
316 | "Notifying %s about BROKEN route at %s-%s of connection %s\n", | 318 | "Notifying %s about BROKEN route at %s-%s of connection %s\n", |
317 | GCP_2s (target->hop), | 319 | GCP_2s (target->hop), |
@@ -326,6 +328,7 @@ send_broken (struct RouteDirection *target, | |||
326 | bm->peer1 = *peer1; | 328 | bm->peer1 = *peer1; |
327 | if (NULL != peer2) | 329 | if (NULL != peer2) |
328 | bm->peer2 = *peer2; | 330 | bm->peer2 = *peer2; |
331 | |||
329 | GCP_request_mq_cancel (target->mqm, | 332 | GCP_request_mq_cancel (target->mqm, |
330 | env); | 333 | env); |
331 | target->mqm = NULL; | 334 | target->mqm = NULL; |