gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r34901 - gnunet/src/conversation


From: gnunet
Subject: [GNUnet-SVN] r34901 - gnunet/src/conversation
Date: Fri, 16 Jan 2015 12:05:21 +0100

Author: grothoff
Date: 2015-01-16 12:05:21 +0100 (Fri, 16 Jan 2015)
New Revision: 34901

Modified:
   gnunet/src/conversation/gnunet-conversation.c
Log:
fix assertion violation if active call is cancelled

Modified: gnunet/src/conversation/gnunet-conversation.c
===================================================================
--- gnunet/src/conversation/gnunet-conversation.c       2015-01-16 10:51:33 UTC 
(rev 34900)
+++ gnunet/src/conversation/gnunet-conversation.c       2015-01-16 11:05:21 UTC 
(rev 34901)
@@ -104,7 +104,6 @@
 };
 
 
-
 /**
  * List of incoming calls
  */
@@ -152,6 +151,7 @@
 
 /**
  * Caller handle (for active incoming call).
+ * This call handler is NOT in the #cl_head / #cl_tail list.
  */
 static struct CallList *cl_active;
 
@@ -282,6 +282,9 @@
     for (cl = cl_head; NULL != cl; cl = cl->next)
       if (caller == cl->caller)
         break;
+    if ( (NULL == cl) &&
+         (caller == cl_active->caller) )
+      cl = cl_active;
     if (NULL == cl)
     {
       GNUNET_break (0);
@@ -290,14 +293,17 @@
     FPRINTF (stdout,
              _("Call from `%s' terminated\n"),
              GNUNET_GNSRECORD_pkey_to_zkey (&cl->caller_id));
-    GNUNET_CONTAINER_DLL_remove (cl_head,
-                                 cl_tail,
-                                 cl);
     if (cl == cl_active)
     {
       cl_active = NULL;
       phone_state = PS_LISTEN;
     }
+    else
+    {
+      GNUNET_CONTAINER_DLL_remove (cl_head,
+                                   cl_tail,
+                                   cl);
+    }
     GNUNET_free (cl);
     break;
   }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]