mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 14:02:52 +07:00
If Finit API call fails (NACK), return non-zero to client
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+4
-1
@@ -80,7 +80,10 @@ int client_send(struct init_request *rq, ssize_t len)
|
||||
if (read(sd, rq, len) != len)
|
||||
goto error;
|
||||
|
||||
result = 0;
|
||||
if (rq->cmd == INIT_CMD_NACK)
|
||||
result = 1;
|
||||
else
|
||||
result = 0;
|
||||
goto exit;
|
||||
error:
|
||||
perror("Failed communicating with finit");
|
||||
|
||||
Reference in New Issue
Block a user