From ca55bff1cf5c71d8e8afdc1252eddb6f0d242472 Mon Sep 17 00:00:00 2001 From: Alexander Alashkin Date: Tue, 27 Oct 2015 09:54:10 +0000 Subject: [PATCH] Fix mg compilation PUBLISHED_FROM=ce7fdfebd3ebbf88688514be501b33ad1241743c --- mongoose.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mongoose.c b/mongoose.c index 5e293807..91e03f9e 100644 --- a/mongoose.c +++ b/mongoose.c @@ -6380,8 +6380,14 @@ void mg_hexdump_connection(struct mg_connection *nc, const char *path, int buf_size = num_bytes * 5 + 100; if ((fp = fopen(path, "a")) != NULL) { +#ifndef MG_DISABLE_SOCKET_IF mg_sock_to_str(nc->sock, src, sizeof(src), 3); mg_sock_to_str(nc->sock, dst, sizeof(dst), 7); +#else + /* TODO (alashkin): should we request info from net_if? */ + strcpy(src, "n/a"); + strcpy(dst, "n/a"); +#endif fprintf( fp, "%lu %p %s %s %s %d\n", (unsigned long) time(NULL), nc, src, ev == MG_EV_RECV ? "<-" : ev == MG_EV_SEND