diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-07-30 12:09:53 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-07-30 12:09:53 +0000 |
commit | 1fb5ae00b7c0be25f1e0538365ccfb060a86635a (patch) | |
tree | fe0d5102cb0805e546e88c8ffd71ba0db95ed614 /src/transport | |
parent | 718e78b68da623db88bdc9693c2d85b5c562df2e (diff) | |
download | gnunet-1fb5ae00b7c0be25f1e0538365ccfb060a86635a.tar.gz gnunet-1fb5ae00b7c0be25f1e0538365ccfb060a86635a.zip |
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/plugin_transport_https.c | 30 | ||||
-rw-r--r-- | src/transport/test_transport_api_rel_https_peer1.conf | 4 | ||||
-rw-r--r-- | src/transport/test_transport_api_rel_https_peer2.conf | 4 |
3 files changed, 19 insertions, 19 deletions
diff --git a/src/transport/plugin_transport_https.c b/src/transport/plugin_transport_https.c index ab8c26595..6f9fcc814 100644 --- a/src/transport/plugin_transport_https.c +++ b/src/transport/plugin_transport_https.c | |||
@@ -44,8 +44,8 @@ | |||
44 | #define DEBUG_HTTPS GNUNET_YES | 44 | #define DEBUG_HTTPS GNUNET_YES |
45 | #define VERBOSE GNUNET_YES | 45 | #define VERBOSE GNUNET_YES |
46 | #define DEBUG_CURL GNUNET_NO | 46 | #define DEBUG_CURL GNUNET_NO |
47 | #define DEBUG_CONNECTIONS GNUNET_NO | 47 | #define DEBUG_CONNECTIONS GNUNET_YES |
48 | #define DEBUG_SESSION_SELECTION GNUNET_NO | 48 | #define DEBUG_SESSION_SELECTION GNUNET_YES |
49 | 49 | ||
50 | #define INBOUND GNUNET_NO | 50 | #define INBOUND GNUNET_NO |
51 | #define OUTBOUND GNUNET_YES | 51 | #define OUTBOUND GNUNET_YES |
@@ -504,7 +504,7 @@ static int remove_session (struct HTTP_PeerContext * pc, struct Session * ps, i | |||
504 | /* no sessions left remove peer */ | 504 | /* no sessions left remove peer */ |
505 | if (pc->head==NULL) | 505 | if (pc->head==NULL) |
506 | { | 506 | { |
507 | #if DEBUG_HTTP | 507 | #if DEBUG_HTTPS |
508 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"No sessions left for peer `%s', removing context\n",GNUNET_i2s(&pc->identity)); | 508 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"No sessions left for peer `%s', removing context\n",GNUNET_i2s(&pc->identity)); |
509 | #endif | 509 | #endif |
510 | remove_peer_context_Iterator(plugin, &pc->identity.hashPubKey, pc); | 510 | remove_peer_context_Iterator(plugin, &pc->identity.hashPubKey, pc); |
@@ -521,7 +521,7 @@ int remove_peer_context_Iterator (void *cls, const GNUNET_HashCode *key, void *v | |||
521 | struct Session * tmp = NULL; | 521 | struct Session * tmp = NULL; |
522 | struct HTTP_Message * msg = NULL; | 522 | struct HTTP_Message * msg = NULL; |
523 | struct HTTP_Message * msg_tmp = NULL; | 523 | struct HTTP_Message * msg_tmp = NULL; |
524 | #if DEBUG_HTTP | 524 | #if DEBUG_HTTPS |
525 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Freeing context for peer `%s'\n",GNUNET_i2s(&pc->identity)); | 525 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Freeing context for peer `%s'\n",GNUNET_i2s(&pc->identity)); |
526 | #endif | 526 | #endif |
527 | GNUNET_CONTAINER_multihashmap_remove (plugin->peers, &pc->identity.hashPubKey, pc); | 527 | GNUNET_CONTAINER_multihashmap_remove (plugin->peers, &pc->identity.hashPubKey, pc); |
@@ -696,7 +696,7 @@ static void mhd_write_mst_cb (void *cls, | |||
696 | struct HTTP_PeerContext *pc = ps->peercontext; | 696 | struct HTTP_PeerContext *pc = ps->peercontext; |
697 | GNUNET_assert(ps != NULL); | 697 | GNUNET_assert(ps != NULL); |
698 | GNUNET_assert(pc != NULL); | 698 | GNUNET_assert(pc != NULL); |
699 | #if DEBUG_HTTP | 699 | #if DEBUG_HTTPS |
700 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 700 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
701 | "Connection %X: Forwarding message to transport service, type %u and size %u from `%s' (`%s')\n", | 701 | "Connection %X: Forwarding message to transport service, type %u and size %u from `%s' (`%s')\n", |
702 | ps, | 702 | ps, |
@@ -930,7 +930,7 @@ mdh_access_cb (void *cls, | |||
930 | *httpSessionCache = ps; | 930 | *httpSessionCache = ps; |
931 | if (ps->msgtok==NULL) | 931 | if (ps->msgtok==NULL) |
932 | ps->msgtok = GNUNET_SERVER_mst_create (&mhd_write_mst_cb, ps); | 932 | ps->msgtok = GNUNET_SERVER_mst_create (&mhd_write_mst_cb, ps); |
933 | #if DEBUG_HTTP | 933 | #if DEBUG_HTTPS |
934 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: HTTPS Daemon has new an incoming `%s' request from peer `%s' (`%s')\n", | 934 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Connection %X: HTTPS Daemon has new an incoming `%s' request from peer `%s' (`%s')\n", |
935 | ps, | 935 | ps, |
936 | method, | 936 | method, |
@@ -1314,7 +1314,7 @@ static void curl_receive_mst_cb (void *cls, | |||
1314 | struct HTTP_PeerContext *pc = ps->peercontext; | 1314 | struct HTTP_PeerContext *pc = ps->peercontext; |
1315 | GNUNET_assert(ps != NULL); | 1315 | GNUNET_assert(ps != NULL); |
1316 | GNUNET_assert(pc != NULL); | 1316 | GNUNET_assert(pc != NULL); |
1317 | #if DEBUG_HTTP | 1317 | #if DEBUG_HTTPS |
1318 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1318 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1319 | "Connection %X: Forwarding message to transport service, type %u and size %u from `%s' (`%s')\n", | 1319 | "Connection %X: Forwarding message to transport service, type %u and size %u from `%s' (`%s')\n", |
1320 | ps, | 1320 | ps, |
@@ -1955,7 +1955,7 @@ http_plugin_send (void *cls, | |||
1955 | 1955 | ||
1956 | GNUNET_assert(cls !=NULL); | 1956 | GNUNET_assert(cls !=NULL); |
1957 | 1957 | ||
1958 | #if DEBUG_HTTP | 1958 | #if DEBUG_HTTPS |
1959 | char * force = GNUNET_malloc(40); | 1959 | char * force = GNUNET_malloc(40); |
1960 | if (force_address == GNUNET_YES) | 1960 | if (force_address == GNUNET_YES) |
1961 | strcpy(force,"forced addr."); | 1961 | strcpy(force,"forced addr."); |
@@ -2038,7 +2038,7 @@ http_plugin_send (void *cls, | |||
2038 | } | 2038 | } |
2039 | else | 2039 | else |
2040 | { | 2040 | { |
2041 | #if DEBUG_HTTP | 2041 | #if DEBUG_HTTPS |
2042 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"No existing session found & and no address given: no way to send this message to peer `%s'!\n", GNUNET_i2s(target)); | 2042 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"No existing session found & and no address given: no way to send this message to peer `%s'!\n", GNUNET_i2s(target)); |
2043 | #endif | 2043 | #endif |
2044 | return GNUNET_SYSERR; | 2044 | return GNUNET_SYSERR; |
@@ -2331,7 +2331,7 @@ libgnunet_plugin_transport_https_done (void *cls) | |||
2331 | if (plugin->multi_handle!=NULL) | 2331 | if (plugin->multi_handle!=NULL) |
2332 | { | 2332 | { |
2333 | mret = curl_multi_cleanup(plugin->multi_handle); | 2333 | mret = curl_multi_cleanup(plugin->multi_handle); |
2334 | #if DEBUG_HTTP | 2334 | #if DEBUG_HTTPS |
2335 | if ( CURLM_OK != mret) | 2335 | if ( CURLM_OK != mret) |
2336 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"curl multihandle clean up failed\n"); | 2336 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"curl multihandle clean up failed\n"); |
2337 | #endif | 2337 | #endif |
@@ -2350,7 +2350,7 @@ libgnunet_plugin_transport_https_done (void *cls) | |||
2350 | GNUNET_free_non_null(plugin->bind_hostname); | 2350 | GNUNET_free_non_null(plugin->bind_hostname); |
2351 | GNUNET_free (plugin); | 2351 | GNUNET_free (plugin); |
2352 | GNUNET_free (api); | 2352 | GNUNET_free (api); |
2353 | #if DEBUG_HTTP | 2353 | #if DEBUG_HTTPS |
2354 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Unload http plugin complete...\n"); | 2354 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Unload http plugin complete...\n"); |
2355 | #endif | 2355 | #endif |
2356 | return NULL; | 2356 | return NULL; |
@@ -2373,7 +2373,7 @@ libgnunet_plugin_transport_https_init (void *cls) | |||
2373 | char * cert_file; | 2373 | char * cert_file; |
2374 | 2374 | ||
2375 | GNUNET_assert(cls !=NULL); | 2375 | GNUNET_assert(cls !=NULL); |
2376 | #if DEBUG_HTTP | 2376 | #if DEBUG_HTTPS |
2377 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Starting https plugin...\n"); | 2377 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Starting https plugin...\n"); |
2378 | #endif | 2378 | #endif |
2379 | 2379 | ||
@@ -2614,19 +2614,19 @@ libgnunet_plugin_transport_https_init (void *cls) | |||
2614 | 2614 | ||
2615 | if (plugin->http_server_task_v4 != GNUNET_SCHEDULER_NO_TASK) | 2615 | if (plugin->http_server_task_v4 != GNUNET_SCHEDULER_NO_TASK) |
2616 | { | 2616 | { |
2617 | #if DEBUG_HTTP | 2617 | #if DEBUG_HTTPS |
2618 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Starting MHD with IPv4 bound to %s with port %u\n",(plugin->bind_hostname!=NULL) ? plugin->bind_hostname : "every address",port); | 2618 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Starting MHD with IPv4 bound to %s with port %u\n",(plugin->bind_hostname!=NULL) ? plugin->bind_hostname : "every address",port); |
2619 | #endif | 2619 | #endif |
2620 | } | 2620 | } |
2621 | else if ((plugin->http_server_task_v6 != GNUNET_SCHEDULER_NO_TASK) && (plugin->http_server_task_v4 != GNUNET_SCHEDULER_NO_TASK)) | 2621 | else if ((plugin->http_server_task_v6 != GNUNET_SCHEDULER_NO_TASK) && (plugin->http_server_task_v4 != GNUNET_SCHEDULER_NO_TASK)) |
2622 | { | 2622 | { |
2623 | #if DEBUG_HTTP | 2623 | #if DEBUG_HTTPS |
2624 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Starting MHD with IPv6 bound to %s with port %u\n",(plugin->bind_hostname!=NULL) ? plugin->bind_hostname : "every address", port); | 2624 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Starting MHD with IPv6 bound to %s with port %u\n",(plugin->bind_hostname!=NULL) ? plugin->bind_hostname : "every address", port); |
2625 | #endif | 2625 | #endif |
2626 | } | 2626 | } |
2627 | else if ((plugin->http_server_task_v6 != GNUNET_SCHEDULER_NO_TASK) && (plugin->http_server_task_v4 == GNUNET_SCHEDULER_NO_TASK)) | 2627 | else if ((plugin->http_server_task_v6 != GNUNET_SCHEDULER_NO_TASK) && (plugin->http_server_task_v4 == GNUNET_SCHEDULER_NO_TASK)) |
2628 | { | 2628 | { |
2629 | #if DEBUG_HTTP | 2629 | #if DEBUG_HTTPS |
2630 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Starting MHD with IPv4 and IPv6 bound to %s with port %u\n",(plugin->bind_hostname!=NULL) ? plugin->bind_hostname : "every address", port); | 2630 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Starting MHD with IPv4 and IPv6 bound to %s with port %u\n",(plugin->bind_hostname!=NULL) ? plugin->bind_hostname : "every address", port); |
2631 | #endif | 2631 | #endif |
2632 | } | 2632 | } |
diff --git a/src/transport/test_transport_api_rel_https_peer1.conf b/src/transport/test_transport_api_rel_https_peer1.conf index 628a3efc5..40aef0f04 100644 --- a/src/transport/test_transport_api_rel_https_peer1.conf +++ b/src/transport/test_transport_api_rel_https_peer1.conf | |||
@@ -7,7 +7,7 @@ BINDTO4 = 127.0.0.1 | |||
7 | #BINDTO6 = ::1 | 7 | #BINDTO6 = ::1 |
8 | 8 | ||
9 | [transport-https] | 9 | [transport-https] |
10 | PORT = 32389 | 10 | PORT = 15001 |
11 | #DEBUG = YES | 11 | #DEBUG = YES |
12 | USE_IPv4 = YES | 12 | USE_IPv4 = YES |
13 | USE_IPv6 = NO | 13 | USE_IPv6 = NO |
@@ -53,7 +53,7 @@ BINARY = gnunet-service-transport | |||
53 | CONFIG = $DEFAULTCONFIG | 53 | CONFIG = $DEFAULTCONFIG |
54 | HOME = $SERVICEHOME | 54 | HOME = $SERVICEHOME |
55 | HOSTNAME = localhost | 55 | HOSTNAME = localhost |
56 | PORT = 12365 | 56 | PORT = 15000 |
57 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock | 57 | UNIXPATH = /tmp/gnunet-p1-service-transport.sock |
58 | #PREFIX = xterm -T transport2 -e gdb --command=cmd --args | 58 | #PREFIX = xterm -T transport2 -e gdb --command=cmd --args |
59 | #PREFIX = valgrind --leak-check=full | 59 | #PREFIX = valgrind --leak-check=full |
diff --git a/src/transport/test_transport_api_rel_https_peer2.conf b/src/transport/test_transport_api_rel_https_peer2.conf index 5b4582a30..978234c90 100644 --- a/src/transport/test_transport_api_rel_https_peer2.conf +++ b/src/transport/test_transport_api_rel_https_peer2.conf | |||
@@ -7,7 +7,7 @@ BINDTO4 = 127.0.0.1 | |||
7 | #BINDTO6 = ::1 | 7 | #BINDTO6 = ::1 |
8 | 8 | ||
9 | [transport-https] | 9 | [transport-https] |
10 | PORT = 32388 | 10 | PORT = 16001 |
11 | DEBUG = NO | 11 | DEBUG = NO |
12 | USE_IPv4 = YES | 12 | USE_IPv4 = YES |
13 | USE_IPv6 = NO | 13 | USE_IPv6 = NO |
@@ -53,7 +53,7 @@ BINARY = gnunet-service-transport | |||
53 | CONFIG = $DEFAULTCONFIG | 53 | CONFIG = $DEFAULTCONFIG |
54 | HOME = $SERVICEHOME | 54 | HOME = $SERVICEHOME |
55 | HOSTNAME = localhost | 55 | HOSTNAME = localhost |
56 | PORT = 22365 | 56 | PORT = 16000 |
57 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock | 57 | UNIXPATH = /tmp/gnunet-p2-service-transport.sock |
58 | #PREFIX = xterm -T transport1 -e gdb --command=cmd --args | 58 | #PREFIX = xterm -T transport1 -e gdb --command=cmd --args |
59 | #PREFIX = valgrind --leak-check=full | 59 | #PREFIX = valgrind --leak-check=full |