-fix crash observed on FreeBSD
[oweals/gnunet.git] / src / conversation / conversation_api_call.c
index 418af0b7327916cc810ad755fdab0fbc61096824..f69a6518cfc2fd997e688605094d6ecfed3d1672 100644 (file)
@@ -384,7 +384,7 @@ handle_call_audio_message (void *cls,
     break;
   case CS_SUSPENDED_CALLEE:
   case CS_SUSPENDED_BOTH:
-    /* can (rarely) also happen: other peer suspended, but mesh might
+    /* can (rarely) also happen: other peer suspended, but cadet might
        have had delayed data on the unreliable channel */
     break;
   case CS_ACTIVE:
@@ -416,6 +416,8 @@ handle_gns_response (void *cls,
   struct GNUNET_MQ_Envelope *e;
   struct ClientCallMessage *ccm;
 
+  GNUNET_break (NULL != call->gns_lookup);
+  GNUNET_break (CS_LOOKUP == call->state);
   call->gns_lookup = NULL;
   for (i=0;i<rd_count;i++)
   {
@@ -517,7 +519,12 @@ reconnect_call (struct GNUNET_CONVERSATION_Call *call)
   call->state = CS_SHUTDOWN;
   call->client = GNUNET_CLIENT_connect ("conversation", call->cfg);
   if (NULL == call->client)
+  {
+    call->event_handler (call->event_handler_cls,
+                       GNUNET_CONVERSATION_EC_CALL_ERROR);
     return;
+  }
+
   call->mq = GNUNET_MQ_queue_for_connection_client (call->client,
                                                     handlers,
                                                     &call_error_handler,