diff options
| author | Andrei Belov <defan@nginx.com> | 2020-11-19 21:19:57 +0300 |
|---|---|---|
| committer | Andrei Belov <defan@nginx.com> | 2020-11-19 21:19:57 +0300 |
| commit | 7f9079a3cd4cdb6ac3fea53f10bd34fe8b82fe9c (patch) | |
| tree | c79dc48a3260156f3f824ecd299e5a4934d749c5 /src/test/nxt_unit_websocket_chat.c | |
| parent | 646d047e5d12515ceac02279b373601ce0752982 (diff) | |
| parent | 806a9b2515c60b12a68cd97af04f7fa5cb4dffed (diff) | |
| download | unit-1.21.0-1.tar.gz unit-1.21.0-1.tar.bz2 | |
Merged with the default branch.1.21.0-1
Diffstat (limited to 'src/test/nxt_unit_websocket_chat.c')
| -rw-r--r-- | src/test/nxt_unit_websocket_chat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/nxt_unit_websocket_chat.c b/src/test/nxt_unit_websocket_chat.c index 6e274722..39f8a440 100644 --- a/src/test/nxt_unit_websocket_chat.c +++ b/src/test/nxt_unit_websocket_chat.c @@ -30,7 +30,7 @@ typedef struct { static int ws_chat_root(nxt_unit_request_info_t *req); -static void ws_chat_broadcast(const void *buf, size_t size); +static void ws_chat_broadcast(const char *buf, size_t size); static const char ws_chat_index_html[]; @@ -139,18 +139,18 @@ ws_chat_root(nxt_unit_request_info_t *req) static void -ws_chat_broadcast(const void *buf, size_t size) +ws_chat_broadcast(const char *buf, size_t size) { ws_chat_request_data_t *data; nxt_unit_request_info_t *req; - nxt_unit_debug(NULL, "broadcast: %s", buf); + nxt_unit_debug(NULL, "broadcast: %*.s", (int) size, buf); nxt_queue_each(data, &ws_chat_sessions, ws_chat_request_data_t, link) { req = nxt_unit_get_request_info_from_data(data); - nxt_unit_req_debug(req, "broadcast: %s", buf); + nxt_unit_req_debug(req, "send: %*.s", (int) size, buf); nxt_unit_websocket_send(req, NXT_WEBSOCKET_OP_TEXT, 1, buf, size); } nxt_queue_loop; |
