From: Matthias Wachs Date: Tue, 14 Feb 2012 15:35:10 +0000 (+0000) Subject: - fix EAGAIN issue X-Git-Tag: initial-import-from-subversion-38251~14847 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8042d0a40b81fe5bbc2b4bf8b8e50acb493af162;hp=e2c054f003fe3a08796b5ef40e82daa70d080d40;p=oweals%2Fgnunet.git - fix EAGAIN issue --- diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c index c5cdb17d4..e5ada0490 100644 --- a/src/transport/plugin_transport_unix.c +++ b/src/transport/plugin_transport_unix.c @@ -64,8 +64,6 @@ */ #define UNIX_NAT_DEFAULT_PORT 22086 -#define MAX_RETRIES 5 - GNUNET_NETWORK_STRUCT_BEGIN /** @@ -100,8 +98,6 @@ struct UNIXMessageWrapper struct UNIXMessage * msg; size_t msgsize; - int retry_counter; - struct GNUNET_TIME_Relative timeout; unsigned int priority; @@ -436,11 +432,9 @@ unix_real_send (void *cls, if (size < msgbuf_size) { -#if DEBUG_UNIX GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Trying to increase socket buffer size from %i to %i for message size %i\n", size, ((msgbuf_size / 1000) + 2) * 1000, msgbuf_size); -#endif size = ((msgbuf_size / 1000) + 2) * 1000; if (GNUNET_NETWORK_socket_setsockopt ((struct GNUNET_NETWORK_Handle *) send_handle, SOL_SOCKET, SO_SNDBUF, @@ -620,7 +614,6 @@ unix_plugin_send (void *cls, wrapper->timeout = to; wrapper->cont = cont; wrapper->cont_cls = cont_cls; - wrapper->retry_counter = 0; wrapper->session = session; GNUNET_CONTAINER_DLL_insert(plugin->msg_head, plugin->msg_tail, wrapper); @@ -759,17 +752,6 @@ unix_plugin_select_write (struct Plugin * plugin) return; } - /* max retries */ - if (msgw->retry_counter > MAX_RETRIES) - { - msgw->cont (msgw->cont_cls, &msgw->session->target, GNUNET_SYSERR); - GNUNET_CONTAINER_DLL_remove(plugin->msg_head, plugin->msg_tail, msgw); - GNUNET_break (0); - GNUNET_free (msgw->msg); - GNUNET_free (msgw); - return; - } - /* failed and no retry */ if (sent == -1) { @@ -781,11 +763,7 @@ unix_plugin_select_write (struct Plugin * plugin) /* failed and retry */ if (sent == 0) - { - msgw->retry_counter++; return; - } - } /*