Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
998425b1
Commit
998425b1
authored
Feb 10, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Styling changes for hexdump
parent
6900dd73
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
mongoose.c
mongoose.c
+7
-5
No files found.
mongoose.c
View file @
998425b1
...
@@ -2029,12 +2029,15 @@ static void callback_http_client_on_connect(struct connection *conn) {
...
@@ -2029,12 +2029,15 @@ static void callback_http_client_on_connect(struct connection *conn) {
#ifdef MONGOOSE_HEXDUMP
#ifdef MONGOOSE_HEXDUMP
static
void
hexdump
(
const
struct
connection
*
conn
,
const
void
*
buf
,
static
void
hexdump
(
const
struct
connection
*
conn
,
const
void
*
buf
,
int
len
,
const
char
*
marker
)
{
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
;
const
unsigned
char
*
p
=
(
const
unsigned
char
*
)
buf
;
char
path
[
MAX_PATH_SIZE
],
date
[
100
],
ascii
[
17
];
char
path
[
MAX_PATH_SIZE
],
date
[
100
],
ascii
[
17
];
FILE
*
fp
;
FILE
*
fp
;
if
(
!
match_prefix
(
MONGOOSE_HEXDUMP
,
strlen
(
MONGOOSE_HEXDUMP
),
conn
->
mg_conn
.
remote_ip
))
{
return
;
}
snprintf
(
path
,
sizeof
(
path
),
"%s.%hu.txt"
,
snprintf
(
path
,
sizeof
(
path
),
"%s.%hu.txt"
,
conn
->
mg_conn
.
remote_ip
,
conn
->
mg_conn
.
remote_port
);
conn
->
mg_conn
.
remote_ip
,
conn
->
mg_conn
.
remote_port
);
...
@@ -2062,7 +2065,6 @@ static void hexdump(const struct connection *conn, const void *buf,
...
@@ -2062,7 +2065,6 @@ static void hexdump(const struct connection *conn, const void *buf,
fclose
(
fp
);
fclose
(
fp
);
}
}
}
}
}
#endif
#endif
static
void
write_to_socket
(
struct
connection
*
conn
)
{
static
void
write_to_socket
(
struct
connection
*
conn
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment