Do not assert. Use NS_FATAL_ERROR.

This commit is contained in:
Mathieu Lacage
2008-09-11 09:54:19 -07:00
parent 7c2c80af1b
commit 75cba72257

View File

@@ -198,7 +198,10 @@ void RandomVariableBase::GetRandomSeeds(uint32_t seeds[6])
{
ssize_t bytes_read = read (RandomVariableBase::devRandom,
&seeds[i], sizeof (seeds[i]));
NS_ASSERT (bytes_read == sizeof (seeds[i]));
if (bytes_read != sizeof (seeds[i]))
{
NS_FATAL_ERROR ("Read from /dev/random failed");
}
}
if (RngStream::CheckSeed(seeds)) break; // Got a valid one
}