+ 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);
+ size = ((msgbuf_size / 1000) + 2) * 1000;
+ if (GNUNET_OK == GNUNET_NETWORK_socket_setsockopt
+ ((struct GNUNET_NETWORK_Handle *) send_handle, SOL_SOCKET, SO_SNDBUF,
+ &size, sizeof (size)))
+ goto resend; /* Increased buffer size, retry sending */
+ else
+ {
+ /* Could not increase buffer size: error, no retry */
+ GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "setsockopt");
+ return GNUNET_SYSERR;
+ }