diff options
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/plugin_transport_http.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index e449f397d..2a4f92141 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <curl/curl.h> | 40 | #include <curl/curl.h> |
41 | 41 | ||
42 | 42 | ||
43 | #define DEBUG_CURL GNUNET_YES | 43 | #define DEBUG_CURL GNUNET_NO |
44 | #define DEBUG_HTTP GNUNET_NO | 44 | #define DEBUG_HTTP GNUNET_NO |
45 | 45 | ||
46 | #define INBOUND GNUNET_NO | 46 | #define INBOUND GNUNET_NO |
@@ -410,8 +410,7 @@ static void mhd_write_mst_cb (void *cls, | |||
410 | 410 | ||
411 | pc->plugin->env->receive (ps->peercontext->plugin->env->cls, | 411 | pc->plugin->env->receive (ps->peercontext->plugin->env->cls, |
412 | &pc->identity, | 412 | &pc->identity, |
413 | message, 1, NULL, | 413 | message, 1, ps, |
414 | //message, 1, ps, | ||
415 | ps->addr, | 414 | ps->addr, |
416 | ps->addrlen); | 415 | ps->addrlen); |
417 | } | 416 | } |
@@ -433,8 +432,7 @@ static void curl_write_mst_cb (void *cls, | |||
433 | 432 | ||
434 | pc->plugin->env->receive (pc->plugin->env->cls, | 433 | pc->plugin->env->receive (pc->plugin->env->cls, |
435 | &pc->identity, | 434 | &pc->identity, |
436 | message, 1, NULL, | 435 | message, 1, ps, |
437 | //message, 1, ps, | ||
438 | ps->addr, | 436 | ps->addr, |
439 | ps->addrlen); | 437 | ps->addrlen); |
440 | } | 438 | } |
@@ -591,7 +589,6 @@ accessHandlerCallback (void *cls, | |||
591 | ps = get_Session(plugin, pc, addr, addr_len); | 589 | ps = get_Session(plugin, pc, addr, addr_len); |
592 | if (ps==NULL) | 590 | if (ps==NULL) |
593 | { | 591 | { |
594 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"RECV: CREATING NEW SESSION %s\n",http_plugin_address_to_string(NULL, addr, addr_len)); | ||
595 | ps = GNUNET_malloc(sizeof (struct Session)); | 592 | ps = GNUNET_malloc(sizeof (struct Session)); |
596 | ps->addr = GNUNET_malloc(addr_len); | 593 | ps->addr = GNUNET_malloc(addr_len); |
597 | memcpy(ps->addr,addr,addr_len); | 594 | memcpy(ps->addr,addr,addr_len); |
@@ -607,10 +604,6 @@ accessHandlerCallback (void *cls, | |||
607 | ps->url = create_url (plugin, ps->addr, ps->addrlen); | 604 | ps->url = create_url (plugin, ps->addr, ps->addrlen); |
608 | GNUNET_CONTAINER_DLL_insert(pc->head,pc->tail,ps); | 605 | GNUNET_CONTAINER_DLL_insert(pc->head,pc->tail,ps); |
609 | } | 606 | } |
610 | else | ||
611 | { | ||
612 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"RECV: SESSION CONTEXT FOUND\n"); | ||
613 | } | ||
614 | 607 | ||
615 | *httpSessionCache = ps; | 608 | *httpSessionCache = ps; |
616 | if (ps->msgtok==NULL) | 609 | if (ps->msgtok==NULL) |
@@ -657,11 +650,6 @@ accessHandlerCallback (void *cls, | |||
657 | response = MHD_create_response_from_callback(-1,32 * 1024, &server_read_callback, ps, NULL); | 650 | response = MHD_create_response_from_callback(-1,32 * 1024, &server_read_callback, ps, NULL); |
658 | res = MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); | 651 | res = MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); |
659 | MHD_destroy_response (response); | 652 | MHD_destroy_response (response); |
660 | |||
661 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"HTTP Daemon has new an incoming `%s' request from peer `%s' (`%s')\n", | ||
662 | method, | ||
663 | GNUNET_i2s(&pc->identity), | ||
664 | http_plugin_address_to_string(NULL, ps->addr, ps->addrlen)); | ||
665 | return res; | 653 | return res; |
666 | } | 654 | } |
667 | return MHD_NO; | 655 | return MHD_NO; |
@@ -811,7 +799,6 @@ static size_t curl_get_header_function( void *ptr, size_t size, size_t nmemb, vo | |||
811 | size_t len = size * nmemb; | 799 | size_t len = size * nmemb; |
812 | long http_result = 0; | 800 | long http_result = 0; |
813 | int res; | 801 | int res; |
814 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: GET HEADER FUNC\n",ps); | ||
815 | /* Getting last http result code */ | 802 | /* Getting last http result code */ |
816 | if (ps->recv_connected==GNUNET_NO) | 803 | if (ps->recv_connected==GNUNET_NO) |
817 | { | 804 | { |
@@ -1531,6 +1518,7 @@ http_plugin_disconnect (void *cls, | |||
1531 | ps->send_active = GNUNET_NO; | 1518 | ps->send_active = GNUNET_NO; |
1532 | ps=ps->next; | 1519 | ps=ps->next; |
1533 | } | 1520 | } |
1521 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"All connections to peer `%s' terminated\n", GNUNET_i2s(target)); | ||
1534 | } | 1522 | } |
1535 | 1523 | ||
1536 | 1524 | ||