]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
linuxdvb: en50494 - use /dev/urandom value instead rand()
authorJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 20:16:43 +0000 (22:16 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 20:16:43 +0000 (22:16 +0200)
src/input/mpegts/linuxdvb/linuxdvb_en50494.c

index 3a888de634c83acb2c0181b078a5a46f8ba552c9..10cbb9dc83b05512de633c321667a8b468b6417b 100644 (file)
@@ -204,7 +204,9 @@ linuxdvb_en50494_tune
     /* to avoid repeated collision, wait a random time 68-118
      * 67,5 is the typical diseqc-time */
     if (i != 0) {
-      int ms = rand()%50 + 68;
+      uint8_t rnd;
+      uuid_random(&rnd, 1);
+      int ms = ((int)rnd)%50 + 68;
       usleep(ms*1000);
     }