*/
#define UNIX_NAT_DEFAULT_PORT 22086
-#define MAX_RETRIES 5
-
GNUNET_NETWORK_STRUCT_BEGIN
/**
struct UNIXMessage * msg;
size_t msgsize;
- int retry_counter;
-
struct GNUNET_TIME_Relative timeout;
unsigned int priority;
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,
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);
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)
{
/* failed and retry */
if (sent == 0)
- {
- msgw->retry_counter++;
return;
- }
-
}
/*