gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r33900 - gnunet/src/cadet


From: gnunet
Subject: [GNUnet-SVN] r33900 - gnunet/src/cadet
Date: Wed, 2 Jul 2014 21:30:47 +0200

Author: bartpolot
Date: 2014-07-02 21:30:47 +0200 (Wed, 02 Jul 2014)
New Revision: 33900

Modified:
   gnunet/src/cadet/gnunet-service-cadet_tunnel.c
Log:
- fix error condition

Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.c      2014-07-02 19:30:46 UTC 
(rev 33899)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.c      2014-07-02 19:30:47 UTC 
(rev 33900)
@@ -1019,7 +1019,8 @@
  *                   this should be TunnelQueue given to the client.
  *                   Otherwise, NULL.
  *
- * @return Handle to cancel message. NULL if @c cont is NULL.
+ * @return Handle to cancel message.
+ *         NULL if @c cont is NULL or an error happens and message is dropped.
  */
 static struct CadetTunnelQueue *
 send_prebuilt_message (const struct GNUNET_MessageHeader *message,
@@ -1070,14 +1071,13 @@
     c = tunnel_get_connection (t);
   if (NULL == c)
   {
-    if (GNUNET_SCHEDULER_NO_TASK != t->destroy_task
-        || (CADET_TUNNEL_SEARCHING != t->cstate
-            && CADET_TUNNEL_WAITING != t->cstate))
+    /* Why is tunnel 'ready'? Should have been queued! */
+    if (GNUNET_SCHEDULER_NO_TASK != t->destroy_task)
     {
       GNUNET_break (0);
       GCT_debug (t, GNUNET_ERROR_TYPE_WARNING);
     }
-    return NULL;
+    return NULL; /* Drop... */
   }
 
   mid = 0;




reply via email to

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