diff options
-rw-r--r-- | sway/ipc.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -183,19 +183,19 @@ void ipc_client_handle_command(struct ipc_client *client) { | |||
183 | } | 183 | } |
184 | 184 | ||
185 | switch (client->current_command) { | 185 | switch (client->current_command) { |
186 | case IPC_COMMAND: | 186 | case IPC_COMMAND: |
187 | { | 187 | { |
188 | buf[client->payload_length] = '\0'; | 188 | buf[client->payload_length] = '\0'; |
189 | bool success = handle_command(config, buf); | 189 | bool success = handle_command(config, buf); |
190 | char reply[64]; | 190 | char reply[64]; |
191 | int length = snprintf(reply, sizeof(reply), "{\"success\":%s}", success ? "true" : "false"); | 191 | int length = snprintf(reply, sizeof(reply), "{\"success\":%s}", success ? "true" : "false"); |
192 | ipc_send_reply(client, reply, (uint32_t) length); | 192 | ipc_send_reply(client, reply, (uint32_t) length); |
193 | break; | 193 | break; |
194 | } | 194 | } |
195 | default: | 195 | default: |
196 | sway_log(L_INFO, "Unknown IPC command type %i", client->current_command); | 196 | sway_log(L_INFO, "Unknown IPC command type %i", client->current_command); |
197 | ipc_client_disconnect(client); | 197 | ipc_client_disconnect(client); |
198 | break; | 198 | break; |
199 | } | 199 | } |
200 | 200 | ||
201 | client->payload_length = 0; | 201 | client->payload_length = 0; |