1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

Lots of bugfixes contributed by Karl Heyes.

svn path=/trunk/icecast/; revision=4111
This commit is contained in:
Michael Smith 2002-11-22 13:00:44 +00:00
parent a6edc8f631
commit 89bf546ad1
7 changed files with 19 additions and 13 deletions

9
TODO
View File

@ -4,13 +4,9 @@ BUGS
- autoconf doesn't set HAVE_POLL
- automake isn't installing things (conf, web) correctly.
- some stuff (like 'genre') isn't making it into the stats dump
- thread_join uses thread->sys_thread, but thread structure has
already been freed in thread_exit()
- make install - doesn't install configs?
FEATURES
--------
@ -32,3 +28,6 @@ FEATURES
- allow using get_predata() stuff to send an "intro" to any newly-connected
user?
- stats to list currently connected clients: ip and hostname

View File

@ -118,7 +118,7 @@ static connection_t *_accept_connection(void)
connection_t *con;
char *ip;
if (util_timed_wait_for_fd(global.serversock, 30) <= 0) {
if (util_timed_wait_for_fd(global.serversock, 100) <= 0) {
return NULL;
}

View File

@ -235,8 +235,10 @@ static void *fserv_thread_function(void *arg)
DEBUG0("Fileserving client had fatal error, disconnecting");
client->client->con->error = 1;
}
/*
else
DEBUG0("Fileserving client had recoverable error");
*/
avl_node_unlock(client_node);
client_node = avl_get_next(client_node);

View File

@ -16,7 +16,7 @@ static mutex_t _global_mutex;
void global_initialize(void)
{
global.serversock = 0;
global.serversock = -1;
global.running = 0;
global.clients = 0;
global.sources = 0;

View File

@ -34,7 +34,7 @@ void sighandler_initialize(void)
void _sig_hup(int signo)
{
INFO1("Caught signal %d, rehashing config and reopening logfiles...", signo);
INFO1("Caught signal %d, rehashing config and reopening logfiles (unimplemented)...", signo);
/* reread config file */

View File

@ -707,6 +707,9 @@ void thread_join(thread_t *thread)
int i;
i = pthread_join(thread->sys_thread, &ret);
_mutex_lock(&_threadtree_mutex);
avl_delete(_threadtree, thread, _free_thread);
_mutex_unlock(&_threadtree_mutex);
_free_thread(thread);
}

View File

@ -54,15 +54,17 @@ int util_timed_wait_for_fd(int fd, int timeout)
return poll(&ufds, 1, timeout);
#else
fd_set rfds;
struct timeval tv;
struct timeval tv, *p=NULL;
FD_ZERO(&rfds);
FD_SET(fd, &rfds);
tv.tv_sec = timeout/1000;
tv.tv_usec = (timeout % 1000)*1000;
return select(fd+1, &rfds, NULL, NULL, &tv);
if(timeout >= 0) {
tv.tv_sec = timeout/1000;
tv.tv_usec = (timeout % 1000)*1000;
p = &tv;
}
return select(fd+1, &rfds, NULL, NULL, p);
#endif
}