X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=server.c;h=f6bc07d6de9e9747b5e10f84f28539e9624998d2;hp=17ff7cb408ae62e551b8e0ce754fe4a1e667c901;hb=d261c537236503faaa31dfb44278b08a492020ec;hpb=6de8cd316c938093c3d9e5e07d959daef4768575 diff --git a/server.c b/server.c index 17ff7cb4..f6bc07d6 100644 --- a/server.c +++ b/server.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2007 Andre Noll + * Copyright (C) 1997-2008 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -51,6 +51,7 @@ * - The object storage layer: \ref osl.c, * - Blob tables: \ref blob.c, * - The error subssystem: \ref error.h. + * - Access control for paraslash senders: \ref acl.c, \ref acl.h. * * Low-level data structures: * @@ -204,7 +205,7 @@ static void shm_init(void) mmd->sender_cmd_data.cmd_num = -1; return; err_out: - PARA_EMERG_LOG("%s", PARA_STRERROR(-ret)); + PARA_EMERG_LOG("%s", para_strerror(-ret)); exit(EXIT_FAILURE); } @@ -318,7 +319,7 @@ static unsigned init_network(void) add_close_on_fork_list(fd); /* child doesn't need the listener */ return fd; err: - PARA_EMERG_LOG("%s\n", PARA_STRERROR(-ret)); + PARA_EMERG_LOG("%s\n", para_strerror(-ret)); exit(EXIT_FAILURE); } @@ -398,11 +399,11 @@ static unsigned server_init(int argc, char **argv) PARA_NOTICE_LOG("initializing audio format handlers\n"); afh_init(); PARA_NOTICE_LOG("initializing virtual streaming system\n"); - vss_init(); mmd->server_pid = getpid(); setup_signal_handling(); PARA_NOTICE_LOG("initializing the audio file selector\n"); init_afs(); + vss_init(); mmd_lock(); /* init network socket */ PARA_NOTICE_LOG("initializing tcp command socket\n"); @@ -479,8 +480,6 @@ repeat: timeout = vss_preselect(&rfds, &wfds, &max_fileno); status_refresh(); for (i = 0; senders[i].name; i++) { - if (senders[i].status != SENDER_ON) - continue; if (!senders[i].pre_select) continue; senders[i].pre_select(&max_fileno, &rfds, &wfds); @@ -492,8 +491,6 @@ repeat: if (ret < 0) goto repeat; for (i = 0; senders[i].name; i++) { - if (senders[i].status != SENDER_ON) - continue; if (!senders[i].post_select) continue; senders[i].post_select(&rfds, &wfds);