diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-08-25 09:03:57 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-08-25 09:03:57 +0200 |
commit | d1c486ccb3e0e91892f9649a16ca3c99f9d7140e (patch) | |
tree | fadfb552e04126e86cb2f66c357471b63298533a /src | |
parent | attributes (diff) | |
download | mds-d1c486ccb3e0e91892f9649a16ca3c99f9d7140e.tar.gz mds-d1c486ccb3e0e91892f9649a16ca3c99f9d7140e.tar.bz2 mds-d1c486ccb3e0e91892f9649a16ca3c99f9d7140e.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/mds-kkbd.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/mds-kkbd.c b/src/mds-kkbd.c index d8edde2..4140ee1 100644 --- a/src/mds-kkbd.c +++ b/src/mds-kkbd.c @@ -1714,23 +1714,12 @@ int fetch_keys(void) */ int send_errno(int error, const char* recv_client_id, const char* recv_message_id) { - size_t n = 69 + strlen(recv_client_id) + strlen(recv_message_id) + 3 * sizeof(int); int r; - - fail_if (ensure_send_buffer_size(n + 1) < 0); - with_mutex (send_mutex, - sprintf(send_buffer, - "Command: error\n" - "To: %s\n" - "In response to: %s\n" - "Message ID: %" PRIu32 "\n" - "Error: %i\n" - "\n", - recv_client_id, recv_message_id, message_id, error); - + r = send_error(recv_client_id, recv_message_id, "get-keyboard-leds", + 0, error, NULL, &send_buffer, &send_buffer_size, + message_id, socket_fd); message_id = message_id == INT32_MAX ? 0 : (message_id + 1); - r = full_send(send_buffer, strlen(send_buffer)); if (r) r = errno ? errno : -1; ); fail_if (errno = (r == -1 ? 0 : r), r); |