[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r12287 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r12287 - gnunet/src/transport |
Date: |
Tue, 20 Jul 2010 15:23:21 +0200 |
Author: wachs
Date: 2010-07-20 15:23:21 +0200 (Tue, 20 Jul 2010)
New Revision: 12287
Modified:
gnunet/src/transport/plugin_transport_http.c
Log:
Modified: gnunet/src/transport/plugin_transport_http.c
===================================================================
--- gnunet/src/transport/plugin_transport_http.c 2010-07-20 12:31:27 UTC
(rev 12286)
+++ gnunet/src/transport/plugin_transport_http.c 2010-07-20 13:23:21 UTC
(rev 12287)
@@ -40,10 +40,10 @@
#include "microhttpd.h"
#include <curl/curl.h>
-#define DEBUG_HTTP GNUNET_NO
-#define DEBUG_CURL GNUNET_NO
-#define DEBUG_CONNECTIONS GNUNET_NO
-#define DEBUG_SESSION_SELECTION GNUNET_NO
+#define DEBUG_HTTP GNUNET_YES
+#define DEBUG_CURL GNUNET_YES
+#define DEBUG_CONNECTIONS GNUNET_YES
+#define DEBUG_SESSION_SELECTION GNUNET_YES
#define INBOUND GNUNET_NO
#define OUTBOUND GNUNET_YES
@@ -1086,6 +1086,8 @@
{
struct Session * ps = stream;
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X:
curl_get_header_cb\n",ps);
+
char * tmp;
size_t len = size * nmemb;
long http_result = 0;
@@ -1122,6 +1124,7 @@
if (tmp[len-2] == 13)
tmp[len-2]= '\0';
}
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: Header: %s\n",ps,tmp);
}
if (NULL != tmp)
GNUNET_free (tmp);
@@ -1439,7 +1442,9 @@
handles_last_run = running;
}
while (mret == CURLM_CALL_MULTI_PERFORM);
- if (running>0) curl_schedule(plugin);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Rescheduling with %u curl handles active\n",running);
+ curl_schedule(plugin);
}
@@ -1448,7 +1453,7 @@
* @param ses session to send data to
* @return GNUNET_SYSERR for hard failure, GNUNET_OK for ok
*/
-static int curl_schedule(void *cls )
+static int curl_schedule(void *cls)
{
struct Plugin *plugin = cls;
fd_set rs;
@@ -1462,14 +1467,12 @@
GNUNET_assert(cls !=NULL);
-
/* Cancel previous scheduled task */
if (plugin->http_curl_task != GNUNET_SCHEDULER_NO_TASK)
{
GNUNET_SCHEDULER_cancel(plugin->env->sched, plugin->http_curl_task);
plugin->http_curl_task = GNUNET_SCHEDULER_NO_TASK;
}
-
max = -1;
FD_ZERO (&rs);
FD_ZERO (&ws);
@@ -1562,7 +1565,12 @@
return GNUNET_SYSERR;
}
if (curl_schedule (plugin) == GNUNET_SYSERR)
+ {
+#if DEBUG_CONNECTIONS
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: could not schedule
curl task\n",ps);
+#endif
return GNUNET_SYSERR;
+ }
#if DEBUG_CONNECTIONS
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: inbound not
connected, initiating connection\n",ps);
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r12287 - gnunet/src/transport,
gnunet <=