diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-08-30 03:26:32 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-08-30 03:26:32 +0200 |
commit | e86c9ec2b722c8b6aef6ea90ecddb57081a1c67f (patch) | |
tree | 001027a8858304d9d1d2d4e161879981fa6ca66f | |
parent | c36cc962e6b3fd7bec8093756d4c3a7df9940862 (diff) | |
download | seatd-e86c9ec2b722c8b6aef6ea90ecddb57081a1c67f.tar.xz |
seatd: Remove unused device_closed msg body
-rw-r--r-- | include/protocol.h | 5 | ||||
-rw-r--r-- | libseat/backend/seatd.c | 4 | ||||
-rw-r--r-- | seatd/client.c | 8 |
3 files changed, 3 insertions, 14 deletions
diff --git a/include/protocol.h b/include/protocol.h index b3250d0..b3361ba 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -54,11 +54,6 @@ struct proto_server_device_opened { // One fd in auxillary data }; -// TODO: Content unused, remove before 0.3.0 -struct proto_server_device_closed { - int device_id; -}; - struct proto_server_error { int error_code; }; diff --git a/libseat/backend/seatd.c b/libseat/backend/seatd.c index 1a187b1..46e354d 100644 --- a/libseat/backend/seatd.c +++ b/libseat/backend/seatd.c @@ -478,9 +478,7 @@ static int close_device(struct libseat *base, int device_id) { return -1; } - struct proto_server_device_closed rmsg; - if (read_header(backend, SERVER_DEVICE_CLOSED, sizeof rmsg, false) == SIZE_MAX || - conn_get(backend, &rmsg, sizeof rmsg) == -1) { + if (read_header(backend, SERVER_DEVICE_CLOSED, 0, false) == SIZE_MAX) { return -1; } diff --git a/seatd/client.c b/seatd/client.c index 0991fbb..dcb9456 100644 --- a/seatd/client.c +++ b/seatd/client.c @@ -250,16 +250,12 @@ static int handle_close_device(struct client *client, int device_id) { goto fail; } - struct proto_server_device_closed msg = { - .device_id = device_id, - }; struct proto_header header = { .opcode = SERVER_DEVICE_CLOSED, - .size = sizeof msg, + .size = 0, }; - if (connection_put(&client->connection, &header, sizeof header) == -1 || - connection_put(&client->connection, &msg, sizeof msg)) { + if (connection_put(&client->connection, &header, sizeof header) == -1) { log_errorf("unable to write response: %s", strerror(errno)); return -1; } |