X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=random_selector.c;h=a9863d522ecf51edf63ec0ed35833b5bfe1405b4;hp=5d8b386c6f433d68ef55b589bbe077df41c9331b;hb=a7a37b282c4e936b2fb34c2bd7423f9f800dfd44;hpb=c39956768e5a7e4bc8c0124b216afbdadf3c0262 diff --git a/random_selector.c b/random_selector.c index 5d8b386c..a9863d52 100644 --- a/random_selector.c +++ b/random_selector.c @@ -21,7 +21,7 @@ #include /* gettimeofday */ #include "server.cmdline.h" #include "server.h" -#include "db.h" +#include "afs.h" #include "error.h" #include "net.h" #include "string.h" @@ -133,10 +133,12 @@ static void random_shutdown(void) int random_selector_init(struct audio_file_selector *s) { struct timeval now; + unsigned int seed; PARA_INFO_LOG("%s", "registering random handlers ;)\n"); gettimeofday(&now, NULL); - srand(now.tv_usec); + seed = now.tv_usec; + srand(seed); s->cmd_list = random_selector_cmds; s->get_audio_file_list = random_get_audio_file_list; s->shutdown = random_shutdown;