ipc: also send a reply for COMMAND messages
This commit is contained in:
parent
5a3d1b38e8
commit
d6f726283c
|
@ -34,6 +34,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** Command reply type */
|
||||||
|
#define I3_IPC_REPLY_TYPE_COMMAND 0
|
||||||
|
|
||||||
/** Workspaces reply type */
|
/** Workspaces reply type */
|
||||||
#define I3_IPC_REPLY_TYPE_WORKSPACES 1
|
#define I3_IPC_REPLY_TYPE_WORKSPACES 1
|
||||||
|
|
||||||
|
|
|
@ -181,6 +181,12 @@ static void ipc_handle_message(int fd, uint8_t *message, int size,
|
||||||
parse_command(global_conn, (const char*)command);
|
parse_command(global_conn, (const char*)command);
|
||||||
free(command);
|
free(command);
|
||||||
|
|
||||||
|
/* For now, every command gets a positive acknowledge
|
||||||
|
* (will change with the new command parser) */
|
||||||
|
const char *reply = "{\"success\":true}";
|
||||||
|
ipc_send_message(fd, (const unsigned char*)reply,
|
||||||
|
I3_IPC_REPLY_TYPE_COMMAND, strlen(reply));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case I3_IPC_MESSAGE_TYPE_GET_WORKSPACES:
|
case I3_IPC_MESSAGE_TYPE_GET_WORKSPACES:
|
||||||
|
|
Loading…
Reference in New Issue