gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r16017 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r16017 - gnunet/src/util
Date: Fri, 15 Jul 2011 15:23:36 +0200

Author: grothoff
Date: 2011-07-15 15:23:36 +0200 (Fri, 15 Jul 2011)
New Revision: 16017

Modified:
   gnunet/src/util/client.c
   gnunet/src/util/connection.c
Log:
fix

Modified: gnunet/src/util/client.c
===================================================================
--- gnunet/src/util/client.c    2011-07-15 13:20:01 UTC (rev 16016)
+++ gnunet/src/util/client.c    2011-07-15 13:23:36 UTC (rev 16017)
@@ -821,6 +821,7 @@
   if (th->th == NULL)
     {
       GNUNET_break (0);
+      th->sock->th = NULL;
       th->notify (th->notify_cls, 0, NULL);
       GNUNET_free (th);
       return;
@@ -882,10 +883,10 @@
                   MAX_ATTEMPTS - th->attempts_left,
                   (unsigned long long) delay.rel_value);
 #endif
+      th->sock->th = th;
       th->reconnect_task = GNUNET_SCHEDULER_add_delayed (delay,
                                                          &client_delayed_retry,
                                                          th);
-      th->sock->th = th;
       return 0;
     }
   GNUNET_assert (size >= th->size);
@@ -939,6 +940,7 @@
   th->notify = notify;
   th->notify_cls = notify_cls;
   th->attempts_left = MAX_ATTEMPTS;
+  sock->th = th;
   if (sock->sock == NULL)
     {
       th->reconnect_task = GNUNET_SCHEDULER_add_delayed (sock->back_off,
@@ -956,10 +958,10 @@
        {
          GNUNET_break (0);
          GNUNET_free (th);
+         sock->th = NULL;
          return NULL;
        }
     }
-  sock->th = th;
   return th;
 }
 
@@ -975,7 +977,7 @@
 {
   if (th->reconnect_task != GNUNET_SCHEDULER_NO_TASK)
     {
-      GNUNET_break (NULL == th->th);
+      GNUNET_assert (NULL == th->th);
       GNUNET_SCHEDULER_cancel (th->reconnect_task);
       th->reconnect_task = GNUNET_SCHEDULER_NO_TASK;
     }

Modified: gnunet/src/util/connection.c
===================================================================
--- gnunet/src/util/connection.c        2011-07-15 13:20:01 UTC (rev 16016)
+++ gnunet/src/util/connection.c        2011-07-15 13:23:36 UTC (rev 16017)
@@ -1712,8 +1712,9 @@
 
 
 /**
- * Cancel the specified transmission-ready
- * notification.
+ * Cancel the specified transmission-ready notification.
+ *
+ * @param th notification to cancel
  */
 void
 GNUNET_CONNECTION_notify_transmit_ready_cancel (struct




reply via email to

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