Commit 998425b1 authored by Sergey Lyubka's avatar Sergey Lyubka

Styling changes for hexdump

parent 6900dd73
......@@ -2029,12 +2029,15 @@ static void callback_http_client_on_connect(struct connection *conn) {
#ifdef MONGOOSE_HEXDUMP
static void hexdump(const struct connection *conn, const void *buf,
int len, const char *marker) {
if (match_prefix(MONGOOSE_HEXDUMP, strlen(MONGOOSE_HEXDUMP),
conn->mg_conn.remote_ip)) {
const unsigned char *p = (const unsigned char *) buf;
char path[MAX_PATH_SIZE], date[100], ascii[17];
FILE *fp;
if (!match_prefix(MONGOOSE_HEXDUMP, strlen(MONGOOSE_HEXDUMP),
conn->mg_conn.remote_ip)) {
return;
}
snprintf(path, sizeof(path), "%s.%hu.txt",
conn->mg_conn.remote_ip, conn->mg_conn.remote_port);
......@@ -2062,7 +2065,6 @@ static void hexdump(const struct connection *conn, const void *buf,
fclose(fp);
}
}
}
#endif
static void write_to_socket(struct connection *conn) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment