[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r33422 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r33422 - gnunet/src/transport |
Date: |
Tue, 27 May 2014 13:49:22 +0200 |
Author: wachs
Date: 2014-05-27 13:49:22 +0200 (Tue, 27 May 2014)
New Revision: 33422
Modified:
gnunet/src/transport/gnunet-service-transport_clients.c
gnunet/src/transport/test_plugin_transport.c
gnunet/src/transport/test_transport_address_switch.c
gnunet/src/transport/transport_api_address_to_string.c
Log:
minor changes
Modified: gnunet/src/transport/gnunet-service-transport_clients.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_clients.c 2014-05-27
11:36:51 UTC (rev 33421)
+++ gnunet/src/transport/gnunet-service-transport_clients.c 2014-05-27
11:49:22 UTC (rev 33422)
@@ -879,6 +879,7 @@
else
{
len = sizeof (struct AddressToStringResultMessage);
+
atsm = GNUNET_malloc (len);
atsm->header.size = ntohs (len);
atsm->header.type = ntohs
(GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING_REPLY);
Modified: gnunet/src/transport/test_plugin_transport.c
===================================================================
--- gnunet/src/transport/test_plugin_transport.c 2014-05-27 11:36:51 UTC
(rev 33421)
+++ gnunet/src/transport/test_plugin_transport.c 2014-05-27 11:49:22 UTC
(rev 33422)
@@ -401,7 +401,8 @@
GNUNET_free(s2a);
pretty_printers_running++;
- api->address_pretty_printer (api->cls, address->transport_name,
address->address, address->address_length, GNUNET_YES,
+ api->address_pretty_printer (api->cls, address->transport_name,
+ address->address, address->address_length, GNUNET_YES,
GNUNET_TIME_UNIT_MINUTES, &address_pretty_printer_cb, w);
if (GNUNET_OK != api->check_address (api->cls, w->address->address,
w->address->address_length))
Modified: gnunet/src/transport/test_transport_address_switch.c
===================================================================
--- gnunet/src/transport/test_transport_address_switch.c 2014-05-27
11:36:51 UTC (rev 33421)
+++ gnunet/src/transport/test_transport_address_switch.c 2014-05-27
11:49:22 UTC (rev 33422)
@@ -228,9 +228,11 @@
if (NULL != p1_stat)
{
GNUNET_STATISTICS_watch_cancel (p1_stat, "transport",
- "# Attempts to switch addresses", stat_start_attempt_cb, p1);
+ "# Attempts to switch addresses",
+ stat_start_attempt_cb, p1);
GNUNET_STATISTICS_watch_cancel (p1_stat, "transport",
- "# Successful attempts to switch addresses", stat_success_attempt_cb,
p1);
+ "# Successful attempts to switch addresses",
+ stat_success_attempt_cb, p1);
GNUNET_STATISTICS_watch_cancel (p1_stat, "transport",
"# Failed attempts to switch addresses (failed to send CONNECT CONT)",
stat_fail_attempt_cb, p1);
@@ -261,9 +263,9 @@
GNUNET_STATISTICS_watch_cancel (p2_stat, "transport",
"# Failed attempts to switch addresses (no response)",
stat_fail_attempt_cb, p2);
- GNUNET_STATISTICS_watch (p1_stat, "transport",
+ GNUNET_STATISTICS_watch (p2_stat, "transport",
"# transport addresses",
- stat_addresses_available, p1);
+ stat_addresses_available, p2);
GNUNET_STATISTICS_destroy (p2_stat, GNUNET_NO);
p2_stat = NULL;
}
@@ -313,7 +315,10 @@
FPRINTF (stderr, "Peer 1 tried %u times to switch and succeeded %u times,
failed %u times\n",
p1_switch_attempts, p1_switch_success, p1_switch_fail);
if (p1_switch_success != p1_switch_attempts)
+ {
+ GNUNET_break (0);
result ++;
+ }
}
else
{
@@ -325,7 +330,10 @@
FPRINTF (stderr, "Peer 2 tried %u times to switch and succeeded %u times,
failed %u times\n",
p2_switch_attempts, p2_switch_success, p2_switch_fail);
if (p2_switch_success != p2_switch_attempts)
+ {
+ GNUNET_break (0);
result ++;
+ }
}
else
{
@@ -337,12 +345,14 @@
(bytes_sent_after_switch == 0) )
{
FPRINTF (stderr, "No data sent after switching!\n");
+ GNUNET_break (0);
res ++;
}
if ( ((p1_switch_attempts > 0) || (p2_switch_attempts > 0)) &&
(bytes_recv_after_switch == 0) )
{
FPRINTF (stderr, "No data received after switching!\n");
+ GNUNET_break (0);
res ++;
}
Modified: gnunet/src/transport/transport_api_address_to_string.c
===================================================================
--- gnunet/src/transport/transport_api_address_to_string.c 2014-05-27
11:36:51 UTC (rev 33421)
+++ gnunet/src/transport/transport_api_address_to_string.c 2014-05-27
11:49:22 UTC (rev 33422)
@@ -104,7 +104,7 @@
if (GNUNET_NO == result)
{
- alucb->cb (alucb->cb_cls, NULL, GNUNET_SYSERR);
+ alucb->cb (alucb->cb_cls, empty_str, GNUNET_SYSERR);
/* expect more replies */
GNUNET_CLIENT_receive (alucb->client, &address_response_processor, alucb,
@@ -112,7 +112,6 @@
return;
}
-
address = (const char *) &atsm[1];
if ( (addr_len > (size - (sizeof (struct AddressToStringResultMessage)))) ||
(address[addr_len -1] != '\0') )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r33422 - gnunet/src/transport,
gnunet <=