[icecast-dev] Bug in the icecast2 error reporting

Pedro Côrte-Real typo at netcabo.pt
Mon Nov 18 04:23:58 PST 2002


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


More information about the Icecast-dev mailing list