diff options
-rw-r--r-- | src/transport/Makefile.am | 18 | ||||
-rw-r--r-- | src/transport/plugin_transport_http.c | 126 | ||||
-rw-r--r-- | src/transport/test_plugin_transport_http.c | 14 | ||||
-rw-r--r-- | src/transport/test_transport_api.c | 2 | ||||
-rw-r--r-- | src/transport/test_transport_api_http_peer1.conf | 2 | ||||
-rw-r--r-- | src/transport/test_transport_api_http_peer2.conf | 2 |
6 files changed, 101 insertions, 63 deletions
diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am index 4a91fd975..741f4324f 100644 --- a/src/transport/Makefile.am +++ b/src/transport/Makefile.am | |||
@@ -74,7 +74,7 @@ plugin_LTLIBRARIES = \ | |||
74 | libgnunet_plugin_transport_udp.la \ | 74 | libgnunet_plugin_transport_udp.la \ |
75 | $(HTTP_PLUGIN_LA) \ | 75 | $(HTTP_PLUGIN_LA) \ |
76 | libgnunet_plugin_transport_template.la | 76 | libgnunet_plugin_transport_template.la |
77 | # TODO: add http, nat, etc. | 77 | # TODO: add nat, etc. |
78 | 78 | ||
79 | libgnunet_plugin_transport_tcp_la_SOURCES = \ | 79 | libgnunet_plugin_transport_tcp_la_SOURCES = \ |
80 | plugin_transport_tcp.c | 80 | plugin_transport_tcp.c |
@@ -134,9 +134,9 @@ check_PROGRAMS = \ | |||
134 | $(HTTP_PLUGIN_CHECK) \ | 134 | $(HTTP_PLUGIN_CHECK) \ |
135 | test_transport_api_udp_nat \ | 135 | test_transport_api_udp_nat \ |
136 | test_transport_api_reliability_tcp \ | 136 | test_transport_api_reliability_tcp \ |
137 | test_transport_api_reliability_tcp_nat | 137 | test_transport_api_reliability_tcp_nat \ |
138 | # test_transport_api_http \ | 138 | test_transport_api_http |
139 | # TODO: add tests for http, nat, etc. | 139 | # TODO: add tests for nat, etc. |
140 | 140 | ||
141 | TESTS = $(check_PROGRAMS) | 141 | TESTS = $(check_PROGRAMS) |
142 | 142 | ||
@@ -176,11 +176,11 @@ test_transport_api_udp_nat_LDADD = \ | |||
176 | $(top_builddir)/src/transport/libgnunettransport.la \ | 176 | $(top_builddir)/src/transport/libgnunettransport.la \ |
177 | $(top_builddir)/src/util/libgnunetutil.la | 177 | $(top_builddir)/src/util/libgnunetutil.la |
178 | 178 | ||
179 | #test_transport_api_http_SOURCES = \ | 179 | test_transport_api_http_SOURCES = \ |
180 | # test_transport_api.c | 180 | test_transport_api.c |
181 | #test_transport_api_http_LDADD = \ | 181 | test_transport_api_http_LDADD = \ |
182 | # $(top_builddir)/src/transport/libgnunettransport.la \ | 182 | $(top_builddir)/src/transport/libgnunettransport.la \ |
183 | # $(top_builddir)/src/util/libgnunetutil.la | 183 | $(top_builddir)/src/util/libgnunetutil.la |
184 | 184 | ||
185 | test_plugin_transport_http_SOURCES = \ | 185 | test_plugin_transport_http_SOURCES = \ |
186 | test_plugin_transport_http.c | 186 | test_plugin_transport_http.c |
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 5e630ad33..1264cb5f5 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c | |||
@@ -178,18 +178,29 @@ struct Session | |||
178 | /** | 178 | /** |
179 | * Sender's ip address to distinguish between incoming connections | 179 | * Sender's ip address to distinguish between incoming connections |
180 | */ | 180 | */ |
181 | struct sockaddr_in * addr_inbound; | 181 | //struct sockaddr_in * addr_inbound; |
182 | 182 | ||
183 | /** | 183 | /** |
184 | * Sender's ip address to distinguish between incoming connections | 184 | * Sender's ip address to distinguish between incoming connections |
185 | */ | 185 | */ |
186 | char * addr_inbound_str; | 186 | void * addr_in; |
187 | |||
188 | size_t addr_in_len; | ||
189 | |||
190 | void * addr_out; | ||
191 | |||
192 | size_t addr_out_len; | ||
193 | |||
194 | /** | ||
195 | * Sender's ip address to distinguish between incoming connections | ||
196 | */ | ||
197 | //char * addr_inbound_str; | ||
187 | 198 | ||
188 | 199 | ||
189 | /** | 200 | /** |
190 | * Sender's ip address specified by transport | 201 | * Sender's ip address specified by transport |
191 | */ | 202 | */ |
192 | struct sockaddr_in * addr_outbound; | 203 | //struct sockaddr_in * addr_outbound; |
193 | 204 | ||
194 | /** | 205 | /** |
195 | * Did we initiate the connection (GNUNET_YES) or the other peer (GNUNET_NO)? | 206 | * Did we initiate the connection (GNUNET_YES) or the other peer (GNUNET_NO)? |
@@ -363,25 +374,27 @@ static struct Session * find_session_by_curlhandle( CURL* handle ) | |||
363 | * @param peer identity | 374 | * @param peer identity |
364 | * @return created session object | 375 | * @return created session object |
365 | */ | 376 | */ |
366 | static struct Session * create_session (struct sockaddr_in *addr_in, struct sockaddr_in *addr_out, const struct GNUNET_PeerIdentity *peer) | 377 | static struct Session * create_session (char * addr_in, size_t addrlen_in, char * addr_out, size_t addrlen_out, const struct GNUNET_PeerIdentity *peer) |
367 | { | 378 | { |
368 | struct Session * ses = GNUNET_malloc ( sizeof( struct Session) ); | 379 | struct Session * ses = GNUNET_malloc ( sizeof( struct Session) ); |
369 | 380 | ||
370 | ses->addr_inbound = GNUNET_malloc ( sizeof (struct sockaddr_in) ); | 381 | if (addrlen_in != 0) |
371 | ses->addr_outbound = GNUNET_malloc ( sizeof (struct sockaddr_in) ); | ||
372 | ses->plugin = plugin; | ||
373 | if ((NULL != addr_in) && (( AF_INET == addr_in->sin_family) || ( AF_INET6 == addr_in->sin_family))) | ||
374 | { | 382 | { |
375 | memcpy(ses->addr_inbound, addr_in, sizeof (struct sockaddr_in)); | 383 | ses->addr_in = GNUNET_malloc (addrlen_in); |
384 | ses->addr_in_len = addrlen_in; | ||
385 | memcpy(ses->addr_in,addr_in,addrlen_in); | ||
376 | } | 386 | } |
377 | if ((NULL != addr_out) && (( AF_INET == addr_out->sin_family) || ( AF_INET6 == addr_out->sin_family))) | 387 | |
388 | if (addrlen_out != 0) | ||
378 | { | 389 | { |
379 | memcpy(ses->addr_outbound, addr_out, sizeof (struct sockaddr_in)); | 390 | ses->addr_out = GNUNET_malloc (addrlen_out); |
391 | ses->addr_out_len = addrlen_out; | ||
392 | memcpy(ses->addr_out,addr_out,addrlen_out); | ||
380 | } | 393 | } |
394 | ses->plugin = plugin; | ||
381 | memcpy(&ses->partner, peer, sizeof (struct GNUNET_PeerIdentity)); | 395 | memcpy(&ses->partner, peer, sizeof (struct GNUNET_PeerIdentity)); |
382 | GNUNET_CRYPTO_hash_to_enc(&ses->partner.hashPubKey,&(ses->hash)); | 396 | GNUNET_CRYPTO_hash_to_enc(&ses->partner.hashPubKey,&(ses->hash)); |
383 | ses->is_active = GNUNET_NO; | 397 | ses->is_active = GNUNET_NO; |
384 | ses->addr_inbound_str = NULL; | ||
385 | ses->pending_inbound_msg = GNUNET_malloc( sizeof (struct HTTP_Message)); | 398 | ses->pending_inbound_msg = GNUNET_malloc( sizeof (struct HTTP_Message)); |
386 | ses->pending_inbound_msg->buf = GNUNET_malloc(GNUNET_SERVER_MAX_MESSAGE_SIZE); | 399 | ses->pending_inbound_msg->buf = GNUNET_malloc(GNUNET_SERVER_MAX_MESSAGE_SIZE); |
387 | ses->pending_inbound_msg->len = GNUNET_SERVER_MAX_MESSAGE_SIZE; | 400 | ses->pending_inbound_msg->len = GNUNET_SERVER_MAX_MESSAGE_SIZE; |
@@ -418,14 +431,16 @@ static void messageTokenizerCallback (void *cls, | |||
418 | 431 | ||
419 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 432 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
420 | "Received message with type %u and size %u from `%s'\n", | 433 | "Received message with type %u and size %u from `%s'\n", |
421 | message->size, | 434 | ntohs(message->type), |
422 | message->type, | 435 | ntohs(message->size), |
423 | GNUNET_i2s(&(cs->partner))); | 436 | GNUNET_i2s(&(cs->partner))); |
424 | plugin->env->receive(plugin->env->cls, | 437 | plugin->env->receive(plugin->env->cls, |
425 | &cs->partner, | 438 | &cs->partner, |
426 | message, 1, NULL, | 439 | message, 1, NULL, |
427 | cs->addr_inbound_str, | 440 | NULL, 0); |
428 | strlen(cs->addr_inbound_str)); | 441 | |
442 | /*(char *)cs->addr_in, | ||
443 | cs->addr_in_len);*/ | ||
429 | } | 444 | } |
430 | 445 | ||
431 | /** | 446 | /** |
@@ -466,7 +481,8 @@ accessHandlerCallback (void *cls, | |||
466 | int res = GNUNET_NO; | 481 | int res = GNUNET_NO; |
467 | struct GNUNET_MessageHeader *cur_msg; | 482 | struct GNUNET_MessageHeader *cur_msg; |
468 | int send_error_to_client; | 483 | int send_error_to_client; |
469 | 484 | struct IPv4HttpAddress ipv4addr; | |
485 | struct IPv6HttpAddress ipv6addr; | ||
470 | 486 | ||
471 | cur_msg = NULL; | 487 | cur_msg = NULL; |
472 | send_error_to_client = GNUNET_NO; | 488 | send_error_to_client = GNUNET_NO; |
@@ -493,12 +509,16 @@ accessHandlerCallback (void *cls, | |||
493 | { | 509 | { |
494 | addrin = conn_info->client_addr; | 510 | addrin = conn_info->client_addr; |
495 | inet_ntop(addrin->sin_family, &(addrin->sin_addr),address,INET_ADDRSTRLEN); | 511 | inet_ntop(addrin->sin_family, &(addrin->sin_addr),address,INET_ADDRSTRLEN); |
512 | memcpy(&ipv4addr.ipv4_addr,&(addrin->sin_addr),sizeof(struct in_addr)); | ||
513 | ipv4addr.u_port = addrin->sin_port; | ||
496 | } | 514 | } |
497 | /* Incoming IPv6 connection */ | 515 | /* Incoming IPv6 connection */ |
498 | if ( AF_INET6 == conn_info->client_addr->sin_family) | 516 | if ( AF_INET6 == conn_info->client_addr->sin_family) |
499 | { | 517 | { |
500 | addrin6 = (struct sockaddr_in6 *) conn_info->client_addr; | 518 | addrin6 = (struct sockaddr_in6 *) conn_info->client_addr; |
501 | inet_ntop(addrin6->sin6_family, &(addrin6->sin6_addr),address,INET6_ADDRSTRLEN); | 519 | inet_ntop(addrin6->sin6_family, &(addrin6->sin6_addr),address,INET6_ADDRSTRLEN); |
520 | memcpy(&ipv6addr.ipv6_addr,&(addrin6->sin6_addr),sizeof(struct in_addr)); | ||
521 | ipv6addr.u6_port = addrin6->sin6_port; | ||
502 | } | 522 | } |
503 | /* find existing session for address */ | 523 | /* find existing session for address */ |
504 | cs = NULL; | 524 | cs = NULL; |
@@ -517,7 +537,10 @@ accessHandlerCallback (void *cls, | |||
517 | if (cs == NULL ) | 537 | if (cs == NULL ) |
518 | { | 538 | { |
519 | /* create new session object */ | 539 | /* create new session object */ |
520 | cs = create_session(conn_info->client_addr, NULL, &pi_in); | 540 | if ( AF_INET6 == conn_info->client_addr->sin_family) |
541 | cs = create_session((char *) &ipv6addr, sizeof(struct IPv6HttpAddress),NULL, 0, &pi_in); | ||
542 | if ( AF_INET == conn_info->client_addr->sin_family) | ||
543 | cs = create_session((char *) &ipv4addr, sizeof(struct IPv4HttpAddress),NULL, 0, &pi_in); | ||
521 | 544 | ||
522 | /* Insert session into linked list */ | 545 | /* Insert session into linked list */ |
523 | if ( plugin->sessions == NULL) | 546 | if ( plugin->sessions == NULL) |
@@ -543,9 +566,8 @@ accessHandlerCallback (void *cls, | |||
543 | { | 566 | { |
544 | *httpSessionCache = cs; | 567 | *httpSessionCache = cs; |
545 | /* Updating session */ | 568 | /* Updating session */ |
569 | /* | ||
546 | memcpy(cs->addr_inbound,conn_info->client_addr, sizeof(struct sockaddr_in)); | 570 | memcpy(cs->addr_inbound,conn_info->client_addr, sizeof(struct sockaddr_in)); |
547 | if (cs->addr_inbound_str != NULL) | ||
548 | GNUNET_free (cs->addr_inbound_str); | ||
549 | if ( AF_INET == cs->addr_inbound->sin_family) | 571 | if ( AF_INET == cs->addr_inbound->sin_family) |
550 | { | 572 | { |
551 | GNUNET_asprintf(&cs->addr_inbound_str,"%s:%u",address,ntohs(cs->addr_inbound->sin_port)); | 573 | GNUNET_asprintf(&cs->addr_inbound_str,"%s:%u",address,ntohs(cs->addr_inbound->sin_port)); |
@@ -556,10 +578,11 @@ accessHandlerCallback (void *cls, | |||
556 | GNUNET_asprintf(&cs->addr_inbound_str,"[%s]:%u",address,ntohs(cs->addr_inbound->sin_port)); | 578 | GNUNET_asprintf(&cs->addr_inbound_str,"[%s]:%u",address,ntohs(cs->addr_inbound->sin_port)); |
557 | 579 | ||
558 | } | 580 | } |
581 | */ | ||
559 | if (cs->msgtok==NULL) | 582 | if (cs->msgtok==NULL) |
560 | cs->msgtok = GNUNET_SERVER_mst_create (GNUNET_SERVER_MAX_MESSAGE_SIZE, cs, &messageTokenizerCallback, cs); | 583 | cs->msgtok = GNUNET_SERVER_mst_create (GNUNET_SERVER_MAX_MESSAGE_SIZE, cs, &messageTokenizerCallback, cs); |
561 | } | 584 | } |
562 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"HTTP Daemon has new an incoming `%s' request from peer `%s' (`%s')\n",method, GNUNET_i2s(&cs->partner),cs->addr_inbound_str); | 585 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"HTTP Daemon has new an incoming `%s' request from peer `%s'\n",method, GNUNET_i2s(&cs->partner)); |
563 | } | 586 | } |
564 | else | 587 | else |
565 | { | 588 | { |
@@ -627,7 +650,7 @@ accessHandlerCallback (void *cls, | |||
627 | if (cs->pending_inbound_msg->pos >= sizeof (struct GNUNET_MessageHeader)) | 650 | if (cs->pending_inbound_msg->pos >= sizeof (struct GNUNET_MessageHeader)) |
628 | { | 651 | { |
629 | cur_msg = (struct GNUNET_MessageHeader *) cs->pending_inbound_msg->buf; | 652 | cur_msg = (struct GNUNET_MessageHeader *) cs->pending_inbound_msg->buf; |
630 | res = GNUNET_SERVER_mst_receive(cs->msgtok,cs->pending_inbound_msg->buf,cs->pending_inbound_msg->pos, GNUNET_NO, GNUNET_NO); | 653 | res = GNUNET_SERVER_mst_receive(cs->msgtok,cs->pending_inbound_msg->buf,cs->pending_inbound_msg->pos, GNUNET_YES, GNUNET_NO); |
631 | if ((res != GNUNET_SYSERR) && (res != GNUNET_NO)) | 654 | if ((res != GNUNET_SYSERR) && (res != GNUNET_NO)) |
632 | send_error_to_client = GNUNET_NO; | 655 | send_error_to_client = GNUNET_NO; |
633 | } | 656 | } |
@@ -1178,7 +1201,7 @@ http_plugin_send (void *cls, | |||
1178 | { | 1201 | { |
1179 | /* create new session object */ | 1202 | /* create new session object */ |
1180 | 1203 | ||
1181 | ses = create_session(NULL, (struct sockaddr_in *) addr, target); | 1204 | ses = create_session((char *) addr, addrlen, NULL, 0, target); |
1182 | ses->is_active = GNUNET_YES; | 1205 | ses->is_active = GNUNET_YES; |
1183 | 1206 | ||
1184 | /* Insert session into linked list */ | 1207 | /* Insert session into linked list */ |
@@ -1200,35 +1223,37 @@ http_plugin_send (void *cls, | |||
1200 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1223 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1201 | "New Session `%s' inserted, count %u\n", GNUNET_i2s(target), plugin->session_count); | 1224 | "New Session `%s' inserted, count %u\n", GNUNET_i2s(target), plugin->session_count); |
1202 | } | 1225 | } |
1226 | if (ses != NULL) | ||
1227 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1228 | "Session `%s' found, count %u\n", GNUNET_i2s(target), plugin->session_count); | ||
1203 | 1229 | ||
1204 | GNUNET_assert (addr!=NULL); | 1230 | GNUNET_assert (addr!=NULL); |
1205 | unsigned int port; | 1231 | unsigned int port; |
1206 | 1232 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"HTTP Plugin: len `%u'\n",addrlen); | |
1207 | /* setting url to send to */ | 1233 | if (ses->addr_out != NULL) GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"have addr out!!!!'\n"); |
1208 | if (force_address == GNUNET_YES) | 1234 | if (addrlen == (sizeof (struct IPv4HttpAddress))) |
1209 | { | 1235 | { |
1210 | if (addrlen == (sizeof (struct IPv4HttpAddress))) | 1236 | address = GNUNET_malloc(INET_ADDRSTRLEN + 1); |
1211 | { | 1237 | inet_ntop(AF_INET, &((struct IPv4HttpAddress *) addr)->ipv4_addr,address,INET_ADDRSTRLEN); |
1212 | address = GNUNET_malloc(INET_ADDRSTRLEN + 1); | 1238 | port = ntohs(((struct IPv4HttpAddress *) addr)->u_port); |
1213 | inet_ntop(AF_INET, &((struct IPv4HttpAddress *) addr)->ipv4_addr,address,INET_ADDRSTRLEN); | 1239 | GNUNET_asprintf (&url, |
1214 | port = ntohs(((struct IPv4HttpAddress *) addr)->u_port); | 1240 | "http://%s:%u/%s", |
1215 | GNUNET_asprintf (&url, | 1241 | address, |
1216 | "http://%s:%u/%s", | 1242 | port, |
1217 | address, | 1243 | (char *) (&my_ascii_hash_ident)); |
1218 | port, | 1244 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"HTTP Plugin: address `%s'\n",address); |
1219 | (char *) (&my_ascii_hash_ident)); | 1245 | GNUNET_free(address); |
1220 | GNUNET_free(address); | 1246 | } |
1221 | } | 1247 | else if (addrlen == (sizeof (struct IPv6HttpAddress))) |
1222 | else if (addrlen == (sizeof (struct IPv6HttpAddress))) | 1248 | { |
1223 | { | 1249 | address = GNUNET_malloc(INET6_ADDRSTRLEN + 1); |
1224 | address = GNUNET_malloc(INET6_ADDRSTRLEN + 1); | 1250 | inet_ntop(AF_INET6, &((struct IPv6HttpAddress *) addr)->ipv6_addr,address,INET6_ADDRSTRLEN); |
1225 | inet_ntop(AF_INET6, &((struct IPv6HttpAddress *) addr)->ipv6_addr,address,INET6_ADDRSTRLEN); | 1251 | port = ntohs(((struct IPv6HttpAddress *) addr)->u6_port); |
1226 | port = ntohs(((struct IPv6HttpAddress *) addr)->u6_port); | 1252 | GNUNET_asprintf(&url, |
1227 | GNUNET_asprintf(&url, | 1253 | "http://%s:%u/%s", |
1228 | "http://%s:%u/%s", | 1254 | address,port,(char *) (&my_ascii_hash_ident)); |
1229 | address,port,(char *) (&my_ascii_hash_ident)); | 1255 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"HTTP Plugin: address `%s'\n",address); |
1230 | GNUNET_free(address); | 1256 | GNUNET_free(address); |
1231 | } | ||
1232 | } | 1257 | } |
1233 | timeout = to; | 1258 | timeout = to; |
1234 | /* setting up message */ | 1259 | /* setting up message */ |
@@ -1591,9 +1616,8 @@ libgnunet_plugin_transport_http_done (void *cls) | |||
1591 | GNUNET_SERVER_mst_destroy (cs->msgtok); | 1616 | GNUNET_SERVER_mst_destroy (cs->msgtok); |
1592 | GNUNET_free (cs->pending_inbound_msg->buf); | 1617 | GNUNET_free (cs->pending_inbound_msg->buf); |
1593 | GNUNET_free (cs->pending_inbound_msg); | 1618 | GNUNET_free (cs->pending_inbound_msg); |
1594 | GNUNET_free_non_null (cs->addr_inbound); | 1619 | GNUNET_free_non_null (cs->addr_in); |
1595 | GNUNET_free_non_null (cs->addr_inbound_str); | 1620 | GNUNET_free_non_null (cs->addr_out); |
1596 | GNUNET_free_non_null (cs->addr_outbound); | ||
1597 | GNUNET_free (cs); | 1621 | GNUNET_free (cs); |
1598 | 1622 | ||
1599 | plugin->session_count--; | 1623 | plugin->session_count--; |
diff --git a/src/transport/test_plugin_transport_http.c b/src/transport/test_plugin_transport_http.c index 63e8be3a1..4daa21de6 100644 --- a/src/transport/test_plugin_transport_http.c +++ b/src/transport/test_plugin_transport_http.c | |||
@@ -1025,6 +1025,20 @@ static void run_connection_tests( ) | |||
1025 | msg2->type = htons(41); | 1025 | msg2->type = htons(41); |
1026 | api->send(api->cls, &my_identity, tmp, 4 * sizeof(struct GNUNET_MessageHeader), 0, TIMEOUT, NULL,addr_head->addr, addr_head->addrlen, GNUNET_YES, &task_send_cont, NULL); | 1026 | api->send(api->cls, &my_identity, tmp, 4 * sizeof(struct GNUNET_MessageHeader), 0, TIMEOUT, NULL,addr_head->addr, addr_head->addrlen, GNUNET_YES, &task_send_cont, NULL); |
1027 | 1027 | ||
1028 | |||
1029 | /* send a multiple GNUNET_messages at a time, second message has incorrect size*/ | ||
1030 | /* GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Ping Hello Message\n"); | ||
1031 | GNUNET_free(tmp); | ||
1032 | tmp = GNUNET_malloc(425); | ||
1033 | msg1 = (struct GNUNET_MessageHeader *) tmp; | ||
1034 | msg1->size = htons(353); | ||
1035 | msg1->type = htons(16); | ||
1036 | msg2 = &tmp[353]; | ||
1037 | msg2->size = htons(72); | ||
1038 | msg2->type = htons(32); | ||
1039 | api->send(api->cls, &my_identity, tmp, 425, 0, TIMEOUT, NULL,addr_head->addr, addr_head->addrlen, GNUNET_YES, &task_send_cont, NULL);*/ | ||
1040 | |||
1041 | |||
1028 | /* send a message with size GNUNET_SERVER_MAX_MESSAGE_SIZE )*/ | 1042 | /* send a message with size GNUNET_SERVER_MAX_MESSAGE_SIZE )*/ |
1029 | GNUNET_free(tmp); | 1043 | GNUNET_free(tmp); |
1030 | tmp = GNUNET_malloc(GNUNET_SERVER_MAX_MESSAGE_SIZE); | 1044 | tmp = GNUNET_malloc(GNUNET_SERVER_MAX_MESSAGE_SIZE); |
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c index 50d0d36e0..f449d375c 100644 --- a/src/transport/test_transport_api.c +++ b/src/transport/test_transport_api.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "gnunet_transport_service.h" | 36 | #include "gnunet_transport_service.h" |
37 | #include "transport.h" | 37 | #include "transport.h" |
38 | 38 | ||
39 | #define VERBOSE GNUNET_NO | 39 | #define VERBOSE GNUNET_YES |
40 | 40 | ||
41 | #define VERBOSE_ARM GNUNET_NO | 41 | #define VERBOSE_ARM GNUNET_NO |
42 | 42 | ||
diff --git a/src/transport/test_transport_api_http_peer1.conf b/src/transport/test_transport_api_http_peer1.conf index 793e12cc0..7ab4b620a 100644 --- a/src/transport/test_transport_api_http_peer1.conf +++ b/src/transport/test_transport_api_http_peer1.conf | |||
@@ -87,7 +87,7 @@ UNIXPATH = /tmp/gnunet-p1-service-arm.sock | |||
87 | 87 | ||
88 | [transport-http] | 88 | [transport-http] |
89 | PORT = 12389 | 89 | PORT = 12389 |
90 | DEBUG = YES | 90 | DEBUG = NO |
91 | 91 | ||
92 | [transport-tcp] | 92 | [transport-tcp] |
93 | PORT = 12399 | 93 | PORT = 12399 |
diff --git a/src/transport/test_transport_api_http_peer2.conf b/src/transport/test_transport_api_http_peer2.conf index 00b90358f..e0de76eaf 100644 --- a/src/transport/test_transport_api_http_peer2.conf +++ b/src/transport/test_transport_api_http_peer2.conf | |||
@@ -94,7 +94,7 @@ UNIXPATH = /tmp/gnunet-p2-service-arm.sock | |||
94 | 94 | ||
95 | [transport-http] | 95 | [transport-http] |
96 | PORT = 22389 | 96 | PORT = 22389 |
97 | DEBUG = YES | 97 | DEBUG = NO |
98 | 98 | ||
99 | [transport-tcp] | 99 | [transport-tcp] |
100 | PORT = 22399 | 100 | PORT = 22399 |