*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
/** \file udp_send.c Para_server's udp sender. */
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
/** \file udp_send.c Para_server's udp sender. */
- /* ignore return value, closing the target anyway. */
- (void)write(sc->fd, buf, len);
+ /*
+ * Ignore the return value of write() since we are closing the target
+ * anyway. The sole purpose of the "do_nothing" statement is to silence
+ * gcc.
+ */
+ if (write(sc->fd, buf, len))
+ do_nothing;
static void udp_shutdown_targets(void)
{
struct sender_client *sc, *tmp;
static void udp_shutdown_targets(void)
{
struct sender_client *sc, *tmp;
mps = generic_max_transport_msg_size(sc->fd) - sizeof(struct udphdr);
PARA_INFO_LOG("current MPS = %d bytes\n", mps);
return mps;
mps = generic_max_transport_msg_size(sc->fd) - sizeof(struct udphdr);
PARA_INFO_LOG("current MPS = %d bytes\n", mps);
return mps;
if (ret == -ERRNO_TO_PARA_ERROR(ECONNREFUSED)) {
/*
* Happens if meanwhile an ICMP Destination / Port Unreachable
if (ret == -ERRNO_TO_PARA_ERROR(ECONNREFUSED)) {
/*
* Happens if meanwhile an ICMP Destination / Port Unreachable
- s->client_cmds[SENDER_ON] = udp_com_on;
- s->client_cmds[SENDER_OFF] = udp_com_off;
- s->client_cmds[SENDER_DENY] = NULL;
- s->client_cmds[SENDER_ALLOW] = NULL;
- s->client_cmds[SENDER_ADD] = udp_com_add;
- s->client_cmds[SENDER_DELETE] = udp_com_delete;
- sender_status = SENDER_OFF;
+ s->client_cmds[SENDER_on] = udp_com_on;
+ s->client_cmds[SENDER_off] = udp_com_off;
+ s->client_cmds[SENDER_deny] = NULL;
+ s->client_cmds[SENDER_allow] = NULL;
+ s->client_cmds[SENDER_add] = udp_com_add;
+ s->client_cmds[SENDER_delete] = udp_com_delete;
+ sender_status = SENDER_off;