gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r5301 - GNUnet/src/server


From: gnunet
Subject: [GNUnet-SVN] r5301 - GNUnet/src/server
Date: Wed, 11 Jul 2007 09:07:19 -0600 (MDT)

Author: grothoff
Date: 2007-07-11 09:07:19 -0600 (Wed, 11 Jul 2007)
New Revision: 5301

Modified:
   GNUnet/src/server/connection.c
Log:
fx

Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c      2007-07-11 09:31:35 UTC (rev 5300)
+++ GNUnet/src/server/connection.c      2007-07-11 15:07:19 UTC (rev 5301)
@@ -1532,6 +1532,7 @@
   int ret;
   SendEntry **entries;
   unsigned int stotal;
+  TSession * tsession;
 
   ENTRY ();
   /* fast ways out */
@@ -1577,8 +1578,9 @@
   if (ret == SYSERR)
     {
       /* transport session is gone! re-establish! */
-      transport->disconnect (be->session.tsession);
+      tsession = be->session.tsession;
       be->session.tsession = NULL;
+      transport->disconnect (tsession);
       ensureTransportConnected (be);
       /* This may have changed the MTU => need to re-do
          everything.  Since we don't want to possibly
@@ -1747,8 +1749,9 @@
     }
   if ((ret == SYSERR) && (be->session.tsession != NULL))
     {
-      transport->disconnect (be->session.tsession);
+      tsession = be->session.tsession;
       be->session.tsession = NULL;
+      transport->disconnect (tsession);
     }
 
   FREE (encryptedMsg);
@@ -1997,6 +2000,7 @@
 {
   P2P_hangup_MESSAGE hangup;
   unsigned int i;
+  TSession * tsession;
 #if DEBUG_CONNECTION
   EncName enc;
 #endif
@@ -2044,8 +2048,9 @@
   be->max_transmitted_limit = MIN_BPM_PER_PEER;
   if (be->session.tsession != NULL)
     {
-      transport->disconnect (be->session.tsession);
+      tsession = be->session.tsession;
       be->session.tsession = NULL;
+      transport->disconnect (tsession);
     }
   for (i = 0; i < be->sendBufferSize; i++)
     {
@@ -3089,6 +3094,7 @@
 {
   BufferEntry *be;
   unsigned int cost;
+  TSession * ts;
 
   ENTRY ();
   if (tsession == NULL)
@@ -3123,8 +3129,11 @@
   if ((transport->getCost (tsession->ttype) < cost) &&
       (transport->associate (tsession) == OK))
     {
-      if (be->session.tsession != NULL)
-        transport->disconnect (be->session.tsession);
+      ts = be->session.tsession;
+      if (ts != NULL) {
+       be->session.tsession = NULL;
+        transport->disconnect (ts);
+      }
       be->session.tsession = tsession;
       be->session.mtu = transport->getMTU (tsession->ttype);
       fragmentIfNecessary (be);





reply via email to

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