-makefile for new test_stream_local (commented)
[oweals/gnunet.git] / src / transport / plugin_transport_http_client.c
index 96bd176f4fcd29b7e910782e295c5e5464e91dfa..4679e451bbbecc22aeeb111b79deedd64ca4fa12 100644 (file)
@@ -75,6 +75,7 @@ client_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
  * Function setting up file descriptors and scheduling task to run
  *
  * @param  plugin plugin as closure
+ * @param now schedule task in 1ms, regardless of what curl may say
  * @return GNUNET_SYSERR for hard failure, GNUNET_OK for ok
  */
 static int
@@ -115,7 +116,7 @@ client_schedule (struct Plugin *plugin, int now)
   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);
+    timeout = GNUNET_TIME_UNIT_MILLISECONDS;
 
   if (mret != CURLM_OK)
   {
@@ -143,9 +144,10 @@ client_schedule (struct Plugin *plugin, int now)
 int
 client_send (struct Session *s, struct HTTP_Message *msg)
 {
+  GNUNET_assert (s != NULL);
   GNUNET_CONTAINER_DLL_insert (s->msg_head, s->msg_tail, msg);
 
-  if ((s != NULL) && (s->client_put_paused == GNUNET_YES))
+  if (s->client_put_paused == GNUNET_YES)
   {
 #if VERBOSE_CLIENT
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, s->plugin->name,
@@ -358,7 +360,7 @@ client_wake_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 * @param stream pointer where to write data
 * @param size size of an individual element
 * @param nmemb count of elements that can be written to the buffer
-* @param ptr destination pointer, passed to the libcurl handle
+* @param cls destination pointer, passed to the libcurl handle
 * @return bytes read from stream
 */
 static size_t
@@ -413,7 +415,7 @@ client_receive (void *stream, size_t size, size_t nmemb, void *cls)
  * @param stream pointer where to write data
  * @param size size of an individual element
  * @param nmemb count of elements that can be written to the buffer
- * @param ptr source pointer, passed to the libcurl handle
+ * @param cls source pointer, passed to the libcurl handle
  * @return bytes written to stream, returning 0 will terminate connection!
  */
 static size_t