gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r21432 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r21432 - gnunet/src/transport
Date: Fri, 11 May 2012 00:24:00 +0200

Author: grothoff
Date: 2012-05-11 00:24:00 +0200 (Fri, 11 May 2012)
New Revision: 21432

Modified:
   gnunet/src/transport/plugin_transport_http_server.c
   gnunet/src/transport/plugin_transport_udp.c
Log:
-eliminating cont-calls check, hard to count exactly with frag

Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2012-05-10 22:11:59 UTC 
(rev 21431)
+++ gnunet/src/transport/plugin_transport_http_server.c 2012-05-10 22:24:00 UTC 
(rev 21432)
@@ -598,13 +598,11 @@
                   const char *upload_data, size_t * upload_data_size,
                   void **httpSessionCache)
 {
-
   struct Plugin *plugin = cls;
   struct ServerConnection *sc = *httpSessionCache;
-  struct Session *s = NULL;
-
-  int res = MHD_YES;
+  struct Session *s;
   struct MHD_Response *response;
+  int res = MHD_YES;
 
   GNUNET_assert (cls != NULL);
   /* new connection */

Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2012-05-10 22:11:59 UTC (rev 
21431)
+++ gnunet/src/transport/plugin_transport_udp.c 2012-05-10 22:24:00 UTC (rev 
21432)
@@ -293,7 +293,6 @@
 
 };
 
-static int cont_calls;
 
 /**
  * We have been notified that our readset has something to read.  We don't
@@ -550,8 +549,6 @@
   if (NULL != udpw->cont)
   {
     udpw->cont (udpw->cont_cls, &udpw->session->target,result);
-    GNUNET_assert (cont_calls > 0);
-    cont_calls --;
   }
 
 }
@@ -703,7 +700,6 @@
     if (NULL != s->frag_ctx->cont)
     {
       s->frag_ctx->cont (s->frag_ctx->cont_cls, &s->target, GNUNET_SYSERR);
-      cont_calls --;
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
           "Calling continuation for fragemented message to `%s' with result 
SYSERR\n",
           GNUNET_i2s (&s->target));
@@ -1012,7 +1008,6 @@
   udpw->udp = (char *) &udpw[1];
 
   udpw->msg_size = msg_len;
-  cont_calls++;
   udpw->cont = &send_next_fragment;
   udpw->cont_cls = udpw;
   udpw->timeout = frag_ctx->timeout;
@@ -1144,10 +1139,6 @@
     udpw->cont = cont;
     udpw->cont_cls = cont_cls;
     udpw->frag_ctx = NULL;
-    if (NULL != udpw->cont)
-    {
-      cont_calls ++;
-    }
     memcpy (udpw->udp, udp, sizeof (struct UDPMessage));
     memcpy (&udpw->udp[sizeof (struct UDPMessage)], msgbuf, msgbuf_size);
 
@@ -1176,8 +1167,6 @@
               &enqueue_fragment,
               frag_ctx);
 
-    if (NULL != frag_ctx->cont)
-      cont_calls ++;
     s->frag_ctx = frag_ctx;
   }
 
@@ -1627,7 +1616,6 @@
         "Calling continuation for fragmented message to `%s' with result %s\n",
         GNUNET_i2s (&s->target), "OK");
     s->frag_ctx->cont (s->frag_ctx->cont_cls, &udp_ack->sender, GNUNET_OK);
-    cont_calls --;
   }
 
   GNUNET_free (s->frag_ctx);
@@ -2420,7 +2408,6 @@
   plugin->nat = NULL;
   GNUNET_free (plugin);
   GNUNET_free (api);
-  GNUNET_assert (0 == cont_calls);
   return NULL;
 }
 




reply via email to

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