GNUNET_SERVER_receive_done (session->client,
GNUNET_SYSERR);
}
- if (session->client != NULL)
+ else if (session->client != NULL)
GNUNET_SERVER_client_drop (session->client);
GNUNET_STATISTICS_update (session->plugin->env->stats,
gettext_noop ("# TCP sessions active"),
* gnunet-nat-client to send dummy ICMP responses.
*
* @param plugin the plugin for this transport
- * @param addr the address of the peer (IPv4-only)
+ * @param sa the address of the peer (IPv4-only)
*/
static void
run_gnunet_nat_client (struct Plugin *plugin,
inet4,
port_as_string,
NULL);
+ if (NULL == proc)
+ return;
/* we know that the gnunet-nat-client will terminate virtually
instantly */
GNUNET_OS_process_wait (proc);
struct TCPProbeContext *tcp_probe_ctx;
struct GNUNET_CONNECTION_Handle *sock;
- if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN)
+ if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
return;
memset (mybuf, 0, sizeof(mybuf));
bytes = GNUNET_DISK_file_read(plugin->server_stdout_handle,
"Finished reading from server stdout with code: %d\n",
bytes);
#endif
+ /* FIXME: consider process_wait here? */
return;
}
/* construct socket address of sender */
memset (&sin_addr, 0, sizeof (sin_addr));
sin_addr.sin_family = AF_INET;
- sin_addr.sin_port = htons((uint16_t) port);
#if HAVE_SOCKADDR_IN_SIN_LEN
sin_addr.sin_len = sizeof (sin_addr);
#endif
plugin);
return;
}
-
+ sin_addr.sin_port = htons((uint16_t) port);
#if DEBUG_TCP_NAT
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG,
"tcp",