[xiph-cvs] r6807 - icecast/trunk/icecast/src
karl at xiph.org
karl at xiph.org
Wed Jun 2 12:34:15 PDT 2004
Author: karl
Date: 2004-06-02 15:34:14 -0400 (Wed, 02 Jun 2004)
New Revision: 6807
Modified:
icecast/trunk/icecast/src/yp.c
Log:
make sure YP entries are flushed out when a source stops. Avoid
segv on failed icecast startup and add some log messages.
<p>Modified: icecast/trunk/icecast/src/yp.c
===================================================================
--- icecast/trunk/icecast/src/yp.c 2004-06-02 18:35:35 UTC (rev 6806)
+++ icecast/trunk/icecast/src/yp.c 2004-06-02 19:34:14 UTC (rev 6807)
@@ -30,11 +30,11 @@
#include "cfgfile.h"
#include "stats.h"
#include <curl/curl.h>
-
-#ifdef WIN32
-#define snprintf _snprintf
-#endif
+#ifdef WIN32
+#define snprintf _snprintf
+#endif
+
#define CATMODULE "yp"
struct yp_server
@@ -314,12 +314,12 @@
INFO1 ("clearing up YP entry for %s", yp->mount);
send_to_yp ("remove", yp, s);
- yp->remove = 1;
free (yp->sid);
yp->sid = NULL;
- yp->process = do_yp_add;
- yp_update = 1;
}
+ yp_update = 1;
+ yp->remove = 1;
+ yp->process = do_yp_add;
return 0;
}
@@ -850,6 +850,7 @@
ypdata_t *yp = find_yp_mount (server, mount);
if (yp)
{
+ DEBUG2 ("mark %s on YP %s", mount, server->url);
yp->process = do_yp_remove;
yp->next_update = 0;
}
@@ -888,7 +889,9 @@
{
yp_running = 0;
yp_update = 1;
- thread_join (yp_thread);
+ if (yp_thread)
+ thread_join (yp_thread);
curl_global_cleanup();
+ INFO0 ("YP thread down");
}
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-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 commits
mailing list