[icecast-dev] No source buffering

Ricardo Galli gallir at uib.es
Fri Feb 20 02:30:31 PST 2004

On Friday 20 February 2004 03:01, oddsock shaped the electrons to shout:
> >Thanks for this patch - it looks right to me, and I've committed it.
> > Sorry I missed it the first time (I found it difficult to understand
> > your actual email, which is probably why I didn't look at it in more
> > detail originally).
> we actually fixed this issue a while back... A continue was added (line
> 459 of stats.c) which will skip the thread_sleep in the case where
> there are pending global events..


Not at the time I produced the patch, there was no continue nearby line 
459 months later I sent the patch. In fact this file had just two 
"continue" (in stats_callback and stats_connection), that did not solve 
the DoS bug.

> also, the global_event_queue pointer has a mutex lock wrapped around
> access to it, which your (Ricardo) patch didn't have.


Do some review of concurrency, there is no _any_ need to enter into the 
criticial section just to check if a pointer (variable) is NULL, if it is 
again checked _inside_ the critical section when is going to be modified, 
as icecast does:

        while (_stats_running) {
                if (_global_event_queue != NULL) {

The previous code is executed right after checking for 
_global_event_queue, so it doesn't make sense to enter the critical 
section. If you did it so, it's clearly inefficient.

> Anyway, hopefully we can move on from this, as your complaints :
> A. icecast needs some sort of burst on connect
> B. the DoS patch you sent in never got incorporated
> are no longer valid since we are currently in process of implementing
> A, and we fixed B (even though we didn't use your patch).

At last, nice. Surely a late implementation is much better than two years 
ahead "bad quality" one.

  ricardo galli       GPG id C8114D34
  Recursivo. (del lat. recursus), adj. Condición de recursivo.

--- >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 at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

More information about the Icecast-dev mailing list