From: Andre Noll Date: Thu, 23 Apr 2009 15:18:03 +0000 (+0200) Subject: [udp_send] Refuse to stream files with invalid chunk tables. X-Git-Tag: v0.3.4~16^2 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=a2872df1d181fe8ed736fcf2bda09134c380d5d2;hp=a2872df1d181fe8ed736fcf2bda09134c380d5d2;p=paraslash.git [udp_send] Refuse to stream files with invalid chunk tables. If an audio file contains a chunk so large that even the maximal possible number of slices is not sufficient to put this chunk into a single FEC group, we must refuse to send this file. It's likely a corrupt file anyway. The old code in num_slices() was buggy as it returned the number of slices needed to send the file as an uint8_t, so the return value was actually the number of needed slices mod 256. This could trigger the assert() in setup_next_fec_group() which checks that the group contains at least one chunk. This patch changes num_slices() to detect this situation more reliably. As it is likely caused by a bad audio file rather than by a networking problem, we do _not_ kick the fec client, but deactivate it for the current file only. This requires the new "error" member of struct fec_client which indicates a temporarily disabled fec client. ---