Mqtt: parsing auth info in the connect message

PUBLISHED_FROM=017e707ea2bd7b1d1972fbb92e5d98c74e17e9d0
This commit is contained in:
Sergey Lyubka authored and Cesanta Bot committed 2016-10-27 17:53:17 +00:00
1 parent a3e2a41834
commit 3a8f47befd
5 files changed
+94 -61

No files matched your search

+3 -3
View File
@@ -63,10 +63,10 @@ static void ev_handler(struct mg_connection *nc, int ev, void *p) {
#if 0
char hex[1024] = {0};
mg_hexdump(nc->recv_mbuf.buf, msg->payload.len, hex, sizeof(hex));
printf("Got incoming message %s:\n%s", msg->topic, hex);
printf("Got incoming message %.*s:\n%s", (int)msg->topic.len, msg->topic.p, hex);
#else
printf("Got incoming message %s: %.*s\n", msg->topic,
(int) msg->payload.len, msg->payload.p);
printf("Got incoming message %.*s: %.*s\n", (int)msg->topic.len,
msg->topic.p, (int) msg->payload.len, msg->payload.p);
#endif
printf("Forwarding to /test\n");