From: Bart Polot Date: Tue, 24 Jun 2014 13:04:22 +0000 (+0000) Subject: - don't try update info on NULL connections, avoid segfault for #3453 X-Git-Tag: initial-import-from-subversion-38251~3598 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=58b2b9afd2fd682c033588a59227b8f422dd2777;p=oweals%2Fgnunet.git - don't try update info on NULL connections, avoid segfault for #3453 --- diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index f71ac1f7b..52fb963cf 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c @@ -595,12 +595,14 @@ conn_message_sent (void *cls, { forced = GNUNET_NO; } - if (NULL == c - && type != GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN - && type != GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY) + if (NULL == c) { - LOG (GNUNET_ERROR_TYPE_ERROR, "Message %s sent on NULL connection!\n", - GC_m2s (type)); + if (type != GNUNET_MESSAGE_TYPE_CADET_CONNECTION_BROKEN + && type != GNUNET_MESSAGE_TYPE_CADET_CONNECTION_DESTROY) + { + LOG (GNUNET_ERROR_TYPE_ERROR, "Message %s sent on NULL connection!\n", + GC_m2s (type)); + } return; } LOG (GNUNET_ERROR_TYPE_DEBUG, " C_P- %p %u\n", c, c->pending_messages);