Hi Guillaume,<br>
<br>
I'm using dump-file and it works wonderfully, what I need is a way to add the source IP <br>
(for example, or other identifier) to the dump file name so that I can keep each source in<br>
separate dumps. This is useful for redistributing each set separately later, without <br>
having to decode, cut and re-encode the dump-file. <br>
<br>
Here's the quick hack to just always do this. <br>
<br>
--- icecast-2.3.0/src/source.c 2005-09-22 23:19:28.000000000 +0300<br>
+++ icecast-2.3.0/src/source.c 2005-10-25 04:18:22.000000000 +0300<br>
@@ -591,11 +591,14 @@<br>
<br>
if (source->dumpfilename != NULL)<br>
{<br>
- source->dumpfile = fopen (source->dumpfilename, "ab");<br>
+ char dumpfile[strlen(source->dumpfilename) + 32];<br>
+ sprintf(dumpfile, "%s.%s", source->dumpfilename, source->client->con->ip);<br>
+<br>
+ source->dumpfile = fopen (dumpfile, "ab");<br>
if (source->dumpfile == NULL)<br>
{<br>
WARN2("Cannot open dump file \"%s\" for appending: %s, disabling.",<br>
-
source->dumpfilename, strerror(errno));<br>
+
dumpfile, strerror(errno));<br>
}<br>
}<br>
<br>
<br>
Of course, the source IP may change.. But it seems to be the only usable identifier. <br>
<br>
PS you shouldn't keep dump-file in /tmp.<br>
<br>
Regards,<br>
Jaakko<br>
<br>