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
9e4cd054
Commit
9e4cd054
authored
Feb 10, 2014
by
Pavel Pimenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix copy-paste for MONGOOSE_HEXDUMP feature
parent
5dc317fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
mongoose.c
mongoose.c
+3
-6
No files found.
mongoose.c
View file @
9e4cd054
...
...
@@ -2029,6 +2029,8 @@ 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
;
...
...
@@ -2060,6 +2062,7 @@ static void hexdump(const struct connection *conn, const void *buf,
fclose
(
fp
);
}
}
}
#endif
static
void
write_to_socket
(
struct
connection
*
conn
)
{
...
...
@@ -2082,10 +2085,7 @@ static void write_to_socket(struct connection *conn) {
conn
,
n
,
io
->
len
,
io
->
size
,
io
->
len
<
40
?
io
->
len
:
40
,
io
->
buf
));
#ifdef MONGOOSE_HEXDUMP
if
(
match_prefix
(
MONGOOSE_HEXDUMP
,
strlen
(
MONGOOSE_HEXDUMP
),
conn
->
mg_conn
.
remote_ip
))
{
hexdump
(
conn
,
io
->
buf
,
n
,
"->"
);
}
#endif
if
(
is_error
(
n
))
{
...
...
@@ -3699,10 +3699,7 @@ static void read_from_socket(struct connection *conn) {
DBG
((
"%p %d %d (1)"
,
conn
,
n
,
conn
->
flags
));
#ifdef MONGOOSE_HEXDUMP
if
(
match_prefix
(
MONGOOSE_HEXDUMP
,
strlen
(
MONGOOSE_HEXDUMP
),
conn
->
mg_conn
.
remote_ip
))
{
hexdump
(
conn
,
buf
,
n
,
"<-"
);
}
#endif
if
(
is_error
(
n
))
{
...
...
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