diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2009-01-04 10:24:02 +0900 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2009-01-04 10:24:02 +0900 |
commit | ab49f0673de484c75c4bf9b202d47f825785d951 (patch) | |
tree | 3faa72b0534a1f3e982a22599e53ac38d958435e /ui | |
parent | 89ccc8e6dc81bc1d613454b9944c2f3324d43e2a (diff) | |
download | petitboot-ab49f0673de484c75c4bf9b202d47f825785d951.zip petitboot-ab49f0673de484c75c4bf9b202d47f825785d951.tar.gz |
Report error is no message is read
Allow the client to detect read() failures.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/common/discover-client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/common/discover-client.c b/ui/common/discover-client.c index 1901f6c..bfd3acf 100644 --- a/ui/common/discover-client.c +++ b/ui/common/discover-client.c @@ -81,7 +81,7 @@ int discover_client_process(struct discover_client *client) message = pb_protocol_read_message(client, client->fd); if (!message) - return 0; + return -1; switch (message->action) { case PB_PROTOCOL_ACTION_ADD: |