forked from external/yambar
module/i3: log errors when IPC replies/events are missing data
This commit is contained in:
parent
f4e456a0ad
commit
1d24755f6b
2 changed files with 21 additions and 5 deletions
|
@ -204,6 +204,8 @@ i3_receive_loop(int abort_fd, int sock,
|
|||
break;
|
||||
}
|
||||
|
||||
LOG_DBG("header: type=%x", hdr->type);
|
||||
|
||||
/* Json-c expects a NULL-terminated string */
|
||||
char json_str[hdr->size + 1];
|
||||
memcpy(json_str, &buf[sizeof(*hdr)], hdr->size);
|
||||
|
@ -219,7 +221,6 @@ i3_receive_loop(int abort_fd, int sock,
|
|||
break;
|
||||
}
|
||||
|
||||
//err = pkt_handler(hdr, json, data);
|
||||
i3_ipc_callback_t pkt_handler = NULL;
|
||||
switch (hdr->type) {
|
||||
case I3_IPC_REPLY_TYPE_COMMAND:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue