gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r17334 - gnunet/src/transport
Date: Mon, 10 Oct 2011 15:22:18 +0200

Author: wachs
Date: 2011-10-10 15:22:18 +0200 (Mon, 10 Oct 2011)
New Revision: 17334

Modified:
   gnunet/src/transport/plugin_transport_http_client.c
Log:
immediate scheduling


Modified: gnunet/src/transport/plugin_transport_http_client.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_client.c 2011-10-10 13:15:05 UTC 
(rev 17333)
+++ gnunet/src/transport/plugin_transport_http_client.c 2011-10-10 13:22:18 UTC 
(rev 17334)
@@ -76,7 +76,7 @@
  * @return GNUNET_SYSERR for hard failure, GNUNET_OK for ok
  */
 static int
-client_schedule (struct Plugin *plugin)
+client_schedule (struct Plugin *plugin, int now)
 {
   fd_set rs;
   fd_set ws;
@@ -112,6 +112,9 @@
     timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1);
   else
     timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 
to);
+  if (now == GNUNET_YES)
+    timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 1);
+
   if (mret != CURLM_OK)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("%s failed at %s:%d: `%s'\n"),
@@ -153,7 +156,7 @@
     curl_easy_pause(s->client_put, CURLPAUSE_CONT);
   }
 
-  client_schedule (s->plugin);
+  client_schedule (s->plugin, GNUNET_YES);
 
   return GNUNET_OK;
 }
@@ -209,7 +212,7 @@
     }
   }
   while (mret == CURLM_CALL_MULTI_PERFORM);
-  client_schedule (plugin);
+  client_schedule (plugin, GNUNET_NO);
 }
 
 int
@@ -289,7 +292,7 @@
     plugin->client_perform_task = GNUNET_SCHEDULER_NO_TASK;
   }
 
-  plugin->client_perform_task = GNUNET_SCHEDULER_add_now(client_run, plugin);
+  client_schedule (plugin, GNUNET_YES);
 
   return res;
 }




reply via email to

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