diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-06-23 15:36:02 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-06-23 15:36:02 +0000 |
commit | 4377ade158e5b6d0e60c3ad1eae2ae74d892d973 (patch) | |
tree | 9afc3dbacc0dfa02a0b7e732a6bd08e1f6512aee /src/transport/test_plugin_transport_http.c | |
parent | 4c751d9030db7e122fa39878e7b9f766ae0db241 (diff) | |
download | gnunet-4377ade158e5b6d0e60c3ad1eae2ae74d892d973.tar.gz gnunet-4377ade158e5b6d0e60c3ad1eae2ae74d892d973.zip |
Diffstat (limited to 'src/transport/test_plugin_transport_http.c')
-rw-r--r-- | src/transport/test_plugin_transport_http.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/transport/test_plugin_transport_http.c b/src/transport/test_plugin_transport_http.c index 6042ad154..4e70dc52e 100644 --- a/src/transport/test_plugin_transport_http.c +++ b/src/transport/test_plugin_transport_http.c | |||
@@ -983,17 +983,12 @@ static void run_connection_tests( ) | |||
983 | port = ntohs(((struct IPv4HttpAddress *) tmp_addr->addr)->u_port); | 983 | port = ntohs(((struct IPv4HttpAddress *) tmp_addr->addr)->u_port); |
984 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Sending message to addres no. %u: `%s':%u\n", count,address, port); | 984 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Sending message to addres no. %u: `%s':%u\n", count,address, port); |
985 | } | 985 | } |
986 | else if (tmp_addr->addrlen == (sizeof (struct IPv6HttpAddress))) | 986 | if (tmp_addr->addrlen == (sizeof (struct IPv6HttpAddress))) |
987 | { | 987 | { |
988 | inet_ntop(AF_INET6, (struct in6_addr *) tmp_addr->addr,address,INET6_ADDRSTRLEN); | 988 | inet_ntop(AF_INET6, (struct in6_addr *) tmp_addr->addr,address,INET6_ADDRSTRLEN); |
989 | port = ntohs(((struct IPv6HttpAddress *) tmp_addr->addr)->u6_port); | 989 | port = ntohs(((struct IPv6HttpAddress *) tmp_addr->addr)->u6_port); |
990 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Sending message to addres no. %u: `%s':%u\n", count,address,port); | 990 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Sending message to addres no. %u: `%s':%u\n", count,address,port); |
991 | } | 991 | } |
992 | else | ||
993 | { | ||
994 | GNUNET_break (0); | ||
995 | return; | ||
996 | } | ||
997 | msg.type=htons(type); | 992 | msg.type=htons(type); |
998 | memcpy(tmp,&msg,sizeof(struct GNUNET_MessageHeader)); | 993 | memcpy(tmp,&msg,sizeof(struct GNUNET_MessageHeader)); |
999 | api->send(api->cls, &my_identity, tmp, sizeof(struct GNUNET_MessageHeader), 0, TIMEOUT, NULL,tmp_addr->addr, tmp_addr->addrlen, GNUNET_YES, &task_send_cont, &fail_msgs_transmited_to_local_addrs); | 994 | api->send(api->cls, &my_identity, tmp, sizeof(struct GNUNET_MessageHeader), 0, TIMEOUT, NULL,tmp_addr->addr, tmp_addr->addrlen, GNUNET_YES, &task_send_cont, &fail_msgs_transmited_to_local_addrs); |
@@ -1021,7 +1016,7 @@ static void run_connection_tests( ) | |||
1021 | msg1->size = htons(2 * sizeof(struct GNUNET_MessageHeader)); | 1016 | msg1->size = htons(2 * sizeof(struct GNUNET_MessageHeader)); |
1022 | msg1->type = htons(40); | 1017 | msg1->type = htons(40); |
1023 | msg2 = &msg1[2]; | 1018 | msg2 = &msg1[2]; |
1024 | msg2->size = htons(3 * sizeof(struct GNUNET_MessageHeader)); | 1019 | msg2->size = htons(2 * sizeof(struct GNUNET_MessageHeader)); |
1025 | msg2->type = htons(41); | 1020 | 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); | 1021 | 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 | 1022 | ||
@@ -1040,13 +1035,14 @@ static void run_connection_tests( ) | |||
1040 | 1035 | ||
1041 | 1036 | ||
1042 | /* send a message with size GNUNET_SERVER_MAX_MESSAGE_SIZE )*/ | 1037 | /* send a message with size GNUNET_SERVER_MAX_MESSAGE_SIZE )*/ |
1038 | /* | ||
1043 | GNUNET_free(tmp); | 1039 | GNUNET_free(tmp); |
1044 | tmp = GNUNET_malloc(GNUNET_SERVER_MAX_MESSAGE_SIZE); | 1040 | tmp = GNUNET_malloc(GNUNET_SERVER_MAX_MESSAGE_SIZE); |
1045 | uint16_t t2 = (uint16_t)GNUNET_SERVER_MAX_MESSAGE_SIZE; | 1041 | uint16_t t2 = (uint16_t)GNUNET_SERVER_MAX_MESSAGE_SIZE; |
1046 | msg.size = htons(t2); | 1042 | msg.size = htons(t2); |
1047 | memcpy(tmp,&msg,sizeof(struct GNUNET_MessageHeader)); | 1043 | memcpy(tmp,&msg,sizeof(struct GNUNET_MessageHeader)); |
1048 | api->send(api->cls, &my_identity, tmp, GNUNET_SERVER_MAX_MESSAGE_SIZE, 0, TIMEOUT, NULL,addr_head->addr, addr_head->addrlen, GNUNET_YES, &task_send_cont, &fail_msg_transmited_bigger_max_size); | 1044 | api->send(api->cls, &my_identity, tmp, GNUNET_SERVER_MAX_MESSAGE_SIZE, 0, TIMEOUT, NULL,addr_head->addr, addr_head->addrlen, GNUNET_YES, &task_send_cont, &fail_msg_transmited_bigger_max_size); |
1049 | 1045 | */ | |
1050 | /* send a message with size GNUNET_SERVER_MAX_MESSAGE_SIZE-1 */ | 1046 | /* send a message with size GNUNET_SERVER_MAX_MESSAGE_SIZE-1 */ |
1051 | GNUNET_free(tmp); | 1047 | GNUNET_free(tmp); |
1052 | tmp = GNUNET_malloc(GNUNET_SERVER_MAX_MESSAGE_SIZE-1); | 1048 | tmp = GNUNET_malloc(GNUNET_SERVER_MAX_MESSAGE_SIZE-1); |