static void udp_close_target(struct sender_client *sc)
{
if (sc->cq != NULL) {
- del_close_on_fork_list(sc->fd);
cq_destroy(sc->cq);
sc->cq = NULL;
}
PARA_NOTICE_LOG("deleting %s (%s) from list\n", sc->name, msg);
udp_close_target(sc);
+ close(sc->fd);
+ del_close_on_fork_list(sc->fd);
vss_del_fec_client(ut->fc);
list_del(&sc->node);
free(sc->name);
{
if (sc->cq == NULL) {
sc->cq = cq_new(UDP_CQ_BYTES);
- add_close_on_fork_list(sc->fd);
PARA_NOTICE_LOG("sending to udp %s\n", sc->name);
}
}
sc = ut->sc = para_calloc(sizeof(*sc));
ut->fcp.slices_per_group = scd->slices_per_group;
ut->fcp.data_slices_per_group = scd->data_slices_per_group;
- ut->fcp.max_slice_bytes = scd->max_slice_bytes;
ut->fcp.init_fec = udp_init_fec;
ut->fcp.send_fec = udp_send_fec;
PARA_INFO_LOG("adding to target list (%s)\n", sc->name);
ut->fc = vss_add_fec_client(sc, &ut->fcp);
para_list_add(&sc->node, &targets);
+ add_close_on_fork_list(sc->fd);
return 1;
err:
if (sc->fd >= 0)
list_for_each_entry(sc, &targets, node) {
struct udp_target *ut = sc->private_data;
- char *tmp = make_message("%s%s/%u:%u:%u ",
+ char *tmp = make_message("%s%s/%u:%u ",
tgts ? : "", sc->name,
- ut->fcp.max_slice_bytes,
ut->fcp.data_slices_per_group,
ut->fcp.slices_per_group
);
{
return make_message(
"usage: {on|off}\n"
- "usage: {add|delete} host[:port][/packet_size:k:n]\n"
+ "usage: {add|delete} ip_address[:port][/[packet_size:]k:n]\n"
+ " - k is the number of data slices per FEC group\n"
+ " - n is the total number of slices in a FEC group\n"
+ " - packet_size reduces the slice size below path MTU\n\n"
"examples: add 224.0.1.38:1500 (IPv4 multicast)\n"
- " add 224.0.1.38:1500/1400:14:16\n"
- " (likewise, using 1400 byte packets, with 14\n"
- " data slices per 16 slice FEC group)\n"
+ " add 224.0.1.38:8080/14:16 (explicit FEC)\n"
" add 10.10.1.42 (using default port)\n"
" add [FF05::42]:1500 (IPv6 multicast)\n"
" add [::1] (IPv6 localhost/default port)\n"