From: Andre Noll Date: Thu, 8 Apr 2010 18:23:15 +0000 (+0200) Subject: udp_send: Fix com_off. X-Git-Tag: v0.4.2~13^2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=91edaa02c232edf82b93a928058c044df80badc1 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. --- 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);