diff options
author | Nathan S. Evans <evans@in.tum.de> | 2011-01-31 11:22:23 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2011-01-31 11:22:23 +0000 |
commit | 58e5ef6d095284050a9e0f9d79ac8008c2fab714 (patch) | |
tree | 6c82ac17c0cd2c2c710940fd0bf268e6d3c4d90f /src/util/connection.c | |
parent | 7e739d9fc537d18ca78ba61135669044ec32c4c2 (diff) | |
download | gnunet-58e5ef6d095284050a9e0f9d79ac8008c2fab714.tar.gz gnunet-58e5ef6d095284050a9e0f9d79ac8008c2fab714.zip |
Fix for unixpath/arm bug
Diffstat (limited to 'src/util/connection.c')
-rw-r--r-- | src/util/connection.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/util/connection.c b/src/util/connection.c index b0504ddd8..095fddb45 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -41,6 +41,8 @@ | |||
41 | 41 | ||
42 | #define DEBUG_CONNECTION GNUNET_NO | 42 | #define DEBUG_CONNECTION GNUNET_NO |
43 | 43 | ||
44 | #define HARD_FAIL GNUNET_NO | ||
45 | |||
44 | 46 | ||
45 | /** | 47 | /** |
46 | * Possible functions to call after connect failed or succeeded. | 48 | * Possible functions to call after connect failed or succeeded. |
@@ -965,14 +967,16 @@ GNUNET_CONNECTION_create_from_connect_to_unixpath (const struct | |||
965 | ret->addr, | 967 | ret->addr, |
966 | ret->addrlen)) | 968 | ret->addrlen)) |
967 | { | 969 | { |
968 | /* Just return; we expect everything to work eventually so don't fail HARD */ | ||
969 | return ret; | ||
970 | #if HARD_FAIL | 970 | #if HARD_FAIL |
971 | GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (ret->sock)); | 971 | GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (ret->sock)); |
972 | GNUNET_free (ret->addr); | 972 | GNUNET_free (ret->addr); |
973 | GNUNET_free (ret->write_buffer); | 973 | GNUNET_free (ret->write_buffer); |
974 | GNUNET_free (ret); | 974 | GNUNET_free (ret); |
975 | return NULL; | 975 | return NULL; |
976 | #else /* Just return; we expect everything to work eventually so don't fail HARD */ | ||
977 | GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (ret->sock)); | ||
978 | ret->sock = NULL; | ||
979 | return ret; | ||
976 | #endif | 980 | #endif |
977 | } | 981 | } |
978 | connect_success_continuation (ret); | 982 | connect_success_continuation (ret); |
@@ -1415,7 +1419,9 @@ connect_error (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1415 | { | 1419 | { |
1416 | struct GNUNET_CONNECTION_Handle *sock = cls; | 1420 | struct GNUNET_CONNECTION_Handle *sock = cls; |
1417 | GNUNET_CONNECTION_TransmitReadyNotify notify; | 1421 | GNUNET_CONNECTION_TransmitReadyNotify notify; |
1418 | 1422 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | |
1423 | "Transmission request of size %u fails, connection failed (%p).\n", | ||
1424 | sock->nth.notify_size, sock); | ||
1419 | #if DEBUG_CONNECTION | 1425 | #if DEBUG_CONNECTION |
1420 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1426 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1421 | "Transmission request of size %u fails, connection failed (%p).\n", | 1427 | "Transmission request of size %u fails, connection failed (%p).\n", |