aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Axel Eriksson <john@insane.se>2018-11-28 22:51:49 +0100
committerJohn Axel Eriksson <john@insane.se>2018-11-29 08:28:42 +0100
commitaef52154ec2041be0a43bba168500952b9f7db5c (patch)
tree79fb4193756230faa69159333abbedbf72854af1
parent9d18d81d484c0e6c5ee3638bc69f1dae53299ba4 (diff)
Fix json object ipc return
-rw-r--r--sway/ipc-server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index e3d73522..b3954259 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -668,7 +668,7 @@ void ipc_client_handle_command(struct ipc_client *client) {
// TODO: Check if they're permitted to use these events
struct json_object *request = json_tokener_parse(buf);
if (request == NULL) {
- const char msg[] = "[{\"success\": false}]";
+ const char msg[] = "{\"success\": false}";
client_valid = ipc_send_reply(client, msg, strlen(msg));
wlr_log(WLR_INFO, "Failed to parse subscribe request");
goto exit_cleanup;
@@ -696,7 +696,7 @@ void ipc_client_handle_command(struct ipc_client *client) {
client->subscribed_events |= event_mask(IPC_EVENT_TICK);
is_tick = true;
} else {
- const char msg[] = "[{\"success\": false}]";
+ const char msg[] = "{\"success\": false}";
client_valid = ipc_send_reply(client, msg, strlen(msg));
json_object_put(request);
wlr_log(WLR_INFO, "Unsupported event type in subscribe request");
@@ -705,7 +705,7 @@ void ipc_client_handle_command(struct ipc_client *client) {
}
json_object_put(request);
- const char msg[] = "[{\"success\": true}]";
+ const char msg[] = "{\"success\": true}";
client_valid = ipc_send_reply(client, msg, strlen(msg));
if (is_tick) {
client->current_command = IPC_EVENT_TICK;