mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-01 11:07:46 +08:00
Fix mg compilation
PUBLISHED_FROM=ce7fdfebd3ebbf88688514be501b33ad1241743c
This commit is contained in:
parent
cfee5c4fdb
commit
ca55bff1cf
@ -6380,8 +6380,14 @@ void mg_hexdump_connection(struct mg_connection *nc, const char *path,
|
|||||||
int buf_size = num_bytes * 5 + 100;
|
int buf_size = num_bytes * 5 + 100;
|
||||||
|
|
||||||
if ((fp = fopen(path, "a")) != NULL) {
|
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, src, sizeof(src), 3);
|
||||||
mg_sock_to_str(nc->sock, dst, sizeof(dst), 7);
|
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(
|
fprintf(
|
||||||
fp, "%lu %p %s %s %s %d\n", (unsigned long) time(NULL), nc, src,
|
fp, "%lu %p %s %s %s %d\n", (unsigned long) time(NULL), nc, src,
|
||||||
ev == MG_EV_RECV ? "<-" : ev == MG_EV_SEND
|
ev == MG_EV_RECV ? "<-" : ev == MG_EV_SEND
|
||||||
|
Loading…
x
Reference in New Issue
Block a user