take sleep() out of urandomdev(), since it just causes problems, and

read() should block if there aren't bytes available yet.
This commit is contained in:
gardners 2013-05-07 14:42:47 +09:30
parent 3f77702ee6
commit dc49671583
2 changed files with 2 additions and 1 deletions

View File

@ -2367,6 +2367,8 @@ struct cli_schema command_line_options[]={
"Interactive servald monitor interface."},
{app_crypt_test,{"test","crypt",NULL}, 0,
"Run cryptography speed test"},
{app_nonce_test,{"test","nonce",NULL}, 0,
"Run nonce generation test"},
{app_slip_test,{"test","slip","[--seed=<N>]","[--duration=<seconds>|--iterations=<N>]",NULL}, 0,
"Run serial encapsulation test"},
#ifdef HAVE_VOIPTEST

1
os.c
View File

@ -113,7 +113,6 @@ int urandombytes(unsigned char *buf, unsigned long long len)
if (errno==EBADF) urandomfd=-1;
return -1;
}
sleep(1);
} else {
tries = 0;
buf += i;