From 91edaa02c232edf82b93a928058c044df80badc1 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 8 Apr 2010 20:23:15 +0200 Subject: [PATCH] udp_send: Fix com_off. When the off command is executed, the udp sender sends an eof packet to all configured targets. However, it then continues to send data. Fix this by returning early in udp_send_fec() if the sender has been switched off. --- udp_send.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/udp_send.c b/udp_send.c index 7d13f148..8677ec5e 100644 --- a/udp_send.c +++ b/udp_send.c @@ -230,8 +230,11 @@ static int udp_com_delete(struct sender_command_data *scd) static int udp_send_fec(char *buf, size_t len, void *private_data) { struct udp_target *ut = private_data; - int ret = udp_init_session(ut); + int ret; + if (sender_status == SENDER_OFF) + return 0; + ret = udp_init_session(ut); if (ret < 0) goto fail; ret = send_queued_chunks(ut->fd, ut->cq, 0); -- 2.30.2