diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-03 20:40:50 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-01-03 20:40:50 +0100 |
commit | 7298a9c67aed2d7a5c5c1df55bfa6052cac04d51 (patch) | |
tree | af92196751fdc7cc326b8e6a32c1c62983fd30bb /swaybar | |
parent | 19833fbc8b607ce881fe9a7f65116240c7ecc87c (diff) | |
download | sway-7298a9c67aed2d7a5c5c1df55bfa6052cac04d51.tar.xz |
Add type to returned response.
Makes `ipc_recv_response` return a struct with size, type and payload
rather than just the payload string.
This is useful if the type has to be checked on the client.
Diffstat (limited to 'swaybar')
-rw-r--r-- | swaybar/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/swaybar/main.c b/swaybar/main.c index aa761b7d..d534345a 100644 --- a/swaybar/main.c +++ b/swaybar/main.c @@ -1025,9 +1025,8 @@ void poll_for_update() { if (FD_ISSET(ipc_event_socketfd, &readfds)) { sway_log(L_DEBUG, "Got workspace update."); - uint32_t len; - char *buf = ipc_recv_response(ipc_event_socketfd, &len); - free(buf); + struct ipc_response *resp = ipc_recv_response(ipc_event_socketfd); + free_ipc_response(resp); ipc_update_workspaces(); dirty = true; } |