indenting
authorChristian Grothoff <christian@grothoff.org>
Mon, 30 May 2011 15:32:44 +0000 (15:32 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 30 May 2011 15:32:44 +0000 (15:32 +0000)
src/core/gnunet-service-core.c

index 0b788679689eb6e638d58f05881ac77abdb33192..1331fce2566840e3621c1d32d43396125734e0d9 100644 (file)
@@ -3025,13 +3025,19 @@ handle_client_request_connect (void *cls,
        (n->th != NULL) )
     {
       if (GNUNET_YES == n->is_connected) 
-       GNUNET_STATISTICS_update (stats, 
-                                 gettext_noop ("# connection requests ignored (already connected)"), 
-                                 1,
-                                 GNUNET_NO);
+       {
+         GNUNET_STATISTICS_update (stats, 
+                                   gettext_noop ("# connection requests ignored (already connected)"), 
+                                   1,
+                                   GNUNET_NO);
+       }
       else
         {
-          GNUNET_TRANSPORT_notify_transmit_ready_cancel(n->th);
+         if (NULL != n->th)
+           {
+             GNUNET_TRANSPORT_notify_transmit_ready_cancel (n->th);
+             n->th = NULL;
+           }
           n->th = GNUNET_TRANSPORT_notify_transmit_ready (transport,
                                                           &cm->peer,
                                                           sizeof (struct GNUNET_MessageHeader), 0,