ID: 3611303 - 'src/plugins/lan/lan.c' - error check is missing braces

Fixed a bug where connecting to a remote shelf manager via the lan
interface would always fail with:

``Activate Session error: Session sequence out of range Error: Unable
to establish LAN session''

This is due to a bug introduced in get_random() by fix for ID#3600963 where
braces were missing from an error check.

Commit for Dan Gora
This commit is contained in:
Zdenek Styblik 2013-04-25 07:50:45 +00:00
parent 723e3da037
commit c29cf4bcd3

View File

@ -212,9 +212,10 @@ get_random(void *data, int len)
if (fd < 0) if (fd < 0)
return errno; return errno;
if (len < 0) if (len < 0) {
close(fd); close(fd);
return errno; /* XXX: ORLY? */ return errno; /* XXX: ORLY? */
}
rv = read(fd, data, len); rv = read(fd, data, len);