gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r24637 - gnunet/src/transport
Date: Wed, 31 Oct 2012 16:10:17 +0100

Author: wachs
Date: 2012-10-31 16:10:17 +0100 (Wed, 31 Oct 2012)
New Revision: 24637

Modified:
   gnunet/src/transport/plugin_transport_http_server.c
Log:
fix

Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2012-10-31 14:24:02 UTC 
(rev 24636)
+++ gnunet/src/transport/plugin_transport_http_server.c 2012-10-31 15:10:17 UTC 
(rev 24637)
@@ -133,6 +133,11 @@
   int session_ended;
 
   /**
+   * Are incoming connection established at the moment
+   */
+  int connect_in_progress;
+
+  /**
    * Absolute time when to receive data again
    * Used for receive throttling
    */
@@ -525,7 +530,7 @@
       GNUNET_break (0);
       return GNUNET_SYSERR;
   }
-  if (NULL == session->server_send)
+  if ((NULL == session->server_send) && (GNUNET_NO == 
session->connect_in_progress))
   {
       GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, session->plugin->name,
                        "Session %p/connection %p: Sending message with %u 
bytes to peer `%s' with FAILED\n",
@@ -1104,6 +1109,7 @@
     s->server_send = NULL;
     s->session_passed = GNUNET_NO;
     s->session_ended = GNUNET_NO;
+    s->connect_in_progress = GNUNET_YES;
     server_start_session_timeout(s);
     GNUNET_CONTAINER_DLL_insert (plugin->head, plugin->tail, s);
   }
@@ -1120,6 +1126,10 @@
     s->server_send = sc;
   if (direction == _RECEIVE)
     s->server_recv = sc;
+
+  if ((NULL != s->server_send) && (NULL != s->server_send))
+    s->connect_in_progress = GNUNET_NO; /* PUT and GET are connected */
+
 #if MHD_VERSION >= 0x00090E00
   if ((NULL == s->server_recv) || (NULL == s->server_send))
   {




reply via email to

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