seatd: Slight error handling cleanup
This commit is contained in:
parent
e86c9ec2b7
commit
c9503ef35d
1 changed files with 2 additions and 2 deletions
|
@ -112,7 +112,7 @@ static int client_send_error(struct client *client, int error_code) {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (connection_put(&client->connection, &errheader, sizeof errheader) == -1 ||
|
if (connection_put(&client->connection, &errheader, sizeof errheader) == -1 ||
|
||||||
connection_put(&client->connection, &errmsg, sizeof errmsg)) {
|
connection_put(&client->connection, &errmsg, sizeof errmsg) == -1) {
|
||||||
log_error("could not send error to client");
|
log_error("could not send error to client");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -221,7 +221,7 @@ static int handle_open_device(struct client *client, char *path) {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (connection_put(&client->connection, &header, sizeof header) == -1 ||
|
if (connection_put(&client->connection, &header, sizeof header) == -1 ||
|
||||||
connection_put(&client->connection, &msg, sizeof msg)) {
|
connection_put(&client->connection, &msg, sizeof msg) == -1) {
|
||||||
log_errorf("unable to write response: %s", strerror(errno));
|
log_errorf("unable to write response: %s", strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue