The icecast2 code uses recv(2) to read data from a source and tests its returning value to see if something went wrong. The current code groups together two checks of the return value: - Returning 0 - Returning -1 and a non-recoverable error and gives the same error message for both. Since returning 0 means the connection has ended the following debug message showed up in error.log: DBUG source/source_main Disconnecting source due to socket read error: Success The attatched patch separates the two cases and makes the first say: DBUG source/source_main Source has disconnected. Should this be an INFO instead of a DBUG? The patch is a small change but looks longer because I indented the code. Pedro Corte-Real. <p> -------------- next part -------------- A non-text attachment was scrubbed... Name: source_error_handling.patch Type: application/octet-stream Size: 2021 bytes Desc: source_error_handling.patch Url : http://lists.xiph.org/pipermail/icecast-dev/attachments/20021118/72ab6d1f/source_error_handling.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: part Type: application/pgp-signature Size: 190 bytes Desc: not available Url : http://lists.xiph.org/pipermail/icecast-dev/attachments/20021118/72ab6d1f/part.pgp
At 12:23 PM 18/11/2002 +0000, you wrote:>The icecast2 code uses recv(2) to read data from a source and tests its >returning value to see if something went wrong. The current code groups >together two checks of the return value: >This is a known problem, I just haven't had time to do anything about it yet (had my final exam today).>The patch is a small change but looks longer because I indented the >code.Well... don't do that, then. Patches that do mass reindenting will always be rejected, unless there's a REALLY good reason to do so (you not liking my indentation style is a very poor reason). Michael <p>--- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Tue, 19 Nov 2002 00:54:13 +1100 Michael Smith <msmith@xiph.org> wrote:> At 12:23 PM 18/11/2002 +0000, you wrote: > >The icecast2 code uses recv(2) to read data from a source and tests > >its returning value to see if something went wrong. The current code > >groups together two checks of the return value: > > > > This is a known problem, I just haven't had time to do anything about > it yet (had my final exam today). > > >The patch is a small change but looks longer because I indented the > >code. > > Well... don't do that, then. Patches that do mass reindenting will > always be rejected, unless there's a REALLY good reason to do so > (you not liking my indentation style is a very poor reason).I didn't do a massive reindenting. I reindented just that small part of the code. I thought it was a mess. Was it supposed to be like that?> MichaelPedro. -------------- next part -------------- A non-text attachment was scrubbed... Name: part Type: application/pgp-signature Size: 190 bytes Desc: not available Url : http://lists.xiph.org/pipermail/icecast-dev/attachments/20021118/faf070c3/part.pgp