[Icecast-dev] Adding additional mount info to xsl stylesheet

Byron Young bky at bkyoung.com
Mon Jan 7 13:11:09 PST 2013


On Sat, 2013-01-05 at 21:58 +0100, Philipp Schafft wrote:
> reflum,
> 
> On Mon, 2012-12-10 at 20:18 -0800, Byron Young wrote:
> > The following patch attempts to make the source client user agent and
> > the max listener client connection duration information available to
> > (icecast 2.3.2) xsl stylesheets.
> 
> Thanks for your work. Does the diff still apply to current trunk? If not
> please send an updated version.

The patch for 2.3.2 successfully applies to, compiles with, and executes
svn18756 (2.4-beta). For reference, a SRPM containing the patch for fc16
is at

ftp://ftp.bkyoung.com/pub/specs/icecast-svn18756-1.fc16.src.rpm

This srpm also adds basic systemd support and builds with no
optimization. The current official rawhide (or even fc18) versions
probably have better systemd support.

> 
> 
> > Will there be any memory leak issues in
> > the lower level functions like the acl, etc. when the source is
> > disconnected, when servicing queries, or otherwise?
> 
> Don't know the scope of the HTTP vars (user agent). Will check this when
> I'm back at home (and got an updated patch). If it can go out of scope
> to early the string can be strduped.

Logically, they are "mount" scope, and should exist while the source
client is mounted. The code probably follows the logic. The lower level
code may strdup the pointers, which could cause memory leaks. Strdup'ing
the pointer to prolong the data existence would also require free'ing on
unmounting the client source. Not sure exactly where that should happen.

> Out of curiosity: Why do you need those information?

Because I'm lazy? And don't want to dig deeper into the lower code
levels? But really, so that just in case if one person actually connects
to and listens to my streaming media server, they will not receive a
segfault and then complain to the development team. 

> 
> 
> Wish you a nice weekend. :)
> 




More information about the Icecast-dev mailing list