[Icecast-dev] Bug in handling fallback-override clients + patch

Mart van Santen mart at greenhost.nl
Fri Jun 14 03:17:09 PDT 2013


Hello,

I noticed a bug in the fallback-override handling in icecast 2.3.3. The
bug is as follows:

We use icecast for distributing a continuous radio stream, let's call
this stream "live", with mountpoint "/live"

In our usecase we have a second audio stream, called "event". This
stream is only online when there is a special event. This is on
mountpoint "/event".

Because we want the "event" stream also to be available, also when there
is no event, we've defined an fallback for the 'event' stream to 'live',
as follows:

    <mount>
        <mount-name>/event</mount-name>
        <fallback-mount>/live</fallback-mount>
        <fallback-override>1</fallback-override>
    </mount>

The expected behavior, when a user is listening to /event, it will
stream /live, and once the event stream is up, the user will be moved to
the special 'event' stream.

This is working fine.

The problem is, icecast is moving 'all' users on '/live' to '/event',
once the event stream get's up.
Also the users who started on '/live' and not to the special '/event'
stream.

The bug is that icecast should not move back users who started on the
'/live' stream, but only users who started listing to the '/event' stream.

I've attached a patch to this e-mail to solve this bug. Unforunally my C
is not very well developed, so I hope I didn't make any pointer or
buffer-overflow errors.

They idea is to store the original requested mountpoint in the client's
structure. Once a fallback-override happens, we check with a strcmp if
the client should be moved back. If not, we leave the client on the
current stream.

I tested this code for correct behavior with 6 clients on two streams.
This works all fine, with starting/stopping the source stream "event"
and opening/closing streams.

I hope you can patch this upstream as well.


Kind regards,

Mart van Santen







-- 
Mart van Santen
Greenhost
E: mart at greenhost.nl
T: +31204890444
A: Weesperstraat 3, Amsterdam, Netherlands

A PGP signature can be attached to this e-mail,
you need PGP software to verify it.
My public key is available in keyserver(s)
see: http://tinyurl.com/openpgp-manual

PGP Fingerprint: CA85 EB11 2B70 042D AF66  B29A 6437 01A1 10A3 D3A5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fallback-override-org-stream-only.patch
Type: text/x-patch
Size: 6556 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/icecast-dev/attachments/20130614/18485402/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
Url : http://lists.xiph.org/pipermail/icecast-dev/attachments/20130614/18485402/attachment.pgp 


More information about the Icecast-dev mailing list