[xiph-cvs] cvs commit: icecast/src fserve.c
Michael Smith
msmith at xiph.org
Wed Aug 28 06:51:00 PDT 2002
msmith 02/08/28 09:50:59
Modified: src fserve.c
Log:
Fix an fserv crash bug if startup failed, and fix an fserv-didn't-actually-
work-at-all-in-most-circumstances bug.
Revision Changes Path
1.5 +7 -2 icecast/src/fserve.c
Index: fserve.c
===================================================================
RCS file: /usr/local/cvsroot/icecast/src/fserve.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- fserve.c 18 Aug 2002 13:38:51 -0000 1.4
+++ fserve.c 28 Aug 2002 13:50:58 -0000 1.5
@@ -47,7 +47,7 @@
static avl_tree *client_tree;
static avl_tree *pending_tree;
-static avl_tree *mimetypes;
+static avl_tree *mimetypes = NULL;
static cond_t fserv_cond;
static thread_t *fserv_thread;
@@ -98,6 +98,9 @@
if(!config_get_config()->fileserve)
return;
+ if(!run_fserv)
+ return;
+
avl_tree_free(mimetypes, _delete_mapping);
run_fserv = 0;
@@ -136,6 +139,7 @@
return;
#else
struct timeval tv;
+ fd_set realfds;
tv.tv_sec = 0;
tv.tv_usec = 200000;
if(client_tree_changed) {
@@ -155,7 +159,8 @@
avl_tree_unlock(client_tree);
}
- if(select(fd_max+1, NULL, &fds, NULL, &tv) > 0)
+ memcpy(&realfds, &fds, sizeof(fd_set));
+ if(select(fd_max+1, NULL, &realfds, NULL, &tv) > 0)
return;
#endif
else {
<p><p>--- >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