fix iteration over random devices
authorSjoerd Simons <sjoerd@luon.net>
Sun, 3 Aug 2008 11:45:35 +0000 (12:45 +0100)
committerLennart Poettering <lennart@poettering.net>
Sun, 3 Aug 2008 14:46:21 +0000 (16:46 +0200)
Actually iterate over the various random devices. Fixes a infinite loop on
startup when /dev/urandom isn't readable. Patch by Matt Kraai on Debian bug
491270, closes #333

Signed-off-by: Lennart Poettering <lennart@poettering.net>
src/pulsecore/random.c

index 5deac37..da38106 100644 (file)
@@ -77,6 +77,8 @@ static int random_proper(void *ret_data, size_t length) {
 
         if (ret == 0)
             break;
+
+        device++;
     }
 
     return ret;