- /*
- * 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 (ut->sent_fec_eof)
+ return;
+ PARA_NOTICE_LOG("sending FEC EOF\n");
+ len = vss_get_fec_eof_packet(&buf);
+ /* Ignore write() errors since we are closing the target anyway. */
static void udp_shutdown_targets(void)
{
struct sender_client *sc, *tmp;
static void udp_shutdown_targets(void)
{
struct sender_client *sc, *tmp;
/** Initialize UDP session and set maximum payload size. */
static int udp_init_fec(struct sender_client *sc)
{
/** Initialize UDP session and set maximum payload size. */
static int udp_init_fec(struct sender_client *sc)
{
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;
- (sender_status == SENDER_ON)? "on" : "off",
- stringify_port(conf.udp_default_port_arg, "udp"),
+ (sender_status == SENDER_on)? "on" : "off",
+ stringify_port(OPT_UINT32_VAL(UDP_DEFAULT_PORT), "udp"),
- for (i = 0; i < conf.udp_target_given; i++) {
- if (udp_resolve_target(conf.udp_target_arg[i], &scd) < 0)
+ for (i = 0; i < OPT_GIVEN(UDP_TARGET); i++) {
+ const char *arg = lls_string_val(i, OPT_RESULT(UDP_TARGET));
+ if (udp_resolve_target(arg, &scd) < 0)
- 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;