Browse Source

we do need to initialized that random() generator

git.mgm/mediaproxy-ng/2.2
Richard Fuchs 13 years ago
parent
commit
87ec55b7b5
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      daemon/main.c

+ 7
- 0
daemon/main.c View File

@ -8,6 +8,8 @@
#include <arpa/inet.h>
#include <dlfcn.h>
#include <errno.h>
#include <stdlib.h>
#include <time.h>
#include "poller.h"
#include "control_tcp.h"
@ -325,6 +327,11 @@ static void wpidfile(void) {
static void init_everything() {
struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
srandom(ts.tv_sec ^ ts.tv_nsec);
#if !GLIB_CHECK_VERSION(2,32,0)
g_thread_init(NULL);
#endif


Loading…
Cancel
Save