summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-10-22 13:00:37 +0200
committerLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-10-22 23:36:24 +0200
commit544c6c412a3e432cb88a4454d0ccfab2856fac8c (patch)
tree7d086e921769519899021b6c20f43b1ce088acbe
parenthandlers: Fix swapped top/bottom for seamless transitions. (diff)
downloadsway-544c6c412a3e432cb88a4454d0ccfab2856fac8c.tar.gz
sway-544c6c412a3e432cb88a4454d0ccfab2856fac8c.tar.zst
sway-544c6c412a3e432cb88a4454d0ccfab2856fac8c.zip
ipc: Return correct status in ipc reply.
-rw-r--r--sway/ipc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/ipc.c b/sway/ipc.c
index e4deb4d4..1521e5cd 100644
--- a/sway/ipc.c
+++ b/sway/ipc.c
@@ -222,7 +222,7 @@ void ipc_client_handle_command(struct ipc_client *client) {
222 case IPC_COMMAND: 222 case IPC_COMMAND:
223 { 223 {
224 buf[client->payload_length] = '\0'; 224 buf[client->payload_length] = '\0';
225 bool success = handle_command(buf); 225 bool success = (handle_command(buf) == CMD_SUCCESS);
226 char reply[64]; 226 char reply[64];
227 int length = snprintf(reply, sizeof(reply), "{\"success\":%s}", success ? "true" : "false"); 227 int length = snprintf(reply, sizeof(reply), "{\"success\":%s}", success ? "true" : "false");
228 ipc_send_reply(client, reply, (uint32_t) length); 228 ipc_send_reply(client, reply, (uint32_t) length);