From 544c6c412a3e432cb88a4454d0ccfab2856fac8c Mon Sep 17 00:00:00 2001
From: "S. Christoffer Eliesen" <christoffer@eliesen.no>
Date: Thu, 22 Oct 2015 13:00:37 +0200
Subject: [PATCH] ipc: Return correct status in ipc reply.

---
 sway/ipc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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) {
 	case IPC_COMMAND:
 	{
 		buf[client->payload_length] = '\0';
-		bool success = handle_command(buf);
+		bool success = (handle_command(buf) == CMD_SUCCESS);
 		char reply[64];
 		int length = snprintf(reply, sizeof(reply), "{\"success\":%s}", success ? "true" : "false");
 		ipc_send_reply(client, reply, (uint32_t) length);