Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
mongoose
Commits
cbf96873
Commit
cbf96873
authored
Oct 21, 2015
by
Marko Mikulicic
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MG_SEND_FUNC/MG_RECV_FUNC rename fail
PUBLISHED_FROM=da28a75111abb5fb49b122133a66ae9bdf63f474
parent
57b35e60
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
mongoose.c
mongoose.c
+7
-7
mongoose.h
mongoose.h
+4
-4
No files found.
mongoose.c
View file @
cbf96873
...
...
@@ -2534,7 +2534,7 @@ static void mg_read_from_socket(struct mg_connection *conn) {
}
}
else
#endif
while
((
n
=
(
int
)
MG_
EV_
RECV_FUNC
(
while
((
n
=
(
int
)
MG_RECV_FUNC
(
conn
->
sock
,
buf
,
recv_avail_size
(
conn
,
sizeof
(
buf
)),
0
))
>
0
)
{
DBG
((
"%p %d bytes (PLAIN) <- %d"
,
conn
,
n
,
conn
->
sock
));
mbuf_append
(
&
conn
->
recv_mbuf
,
buf
,
n
);
...
...
@@ -2581,7 +2581,7 @@ static void mg_write_to_socket(struct mg_connection *conn) {
}
else
#endif
{
n
=
(
int
)
MG_
EV_
SEND_FUNC
(
conn
->
sock
,
io
->
buf
,
io
->
len
,
0
);
n
=
(
int
)
MG_SEND_FUNC
(
conn
->
sock
,
io
->
buf
,
io
->
len
,
0
);
}
DBG
((
"%p %d bytes -> %d"
,
conn
,
n
,
conn
->
sock
));
...
...
@@ -2706,8 +2706,8 @@ static void mg_mgr_handle_connection(struct mg_connection *nc, int fd_flags,
static
void
mg_mgr_handle_ctl_sock
(
struct
mg_mgr
*
mgr
)
{
struct
ctl_msg
ctl_msg
;
int
len
=
(
int
)
MG_
EV_
RECV_FUNC
(
mgr
->
ctl
[
1
],
(
char
*
)
&
ctl_msg
,
sizeof
(
ctl_msg
),
0
);
MG_
EV_
SEND_FUNC
(
mgr
->
ctl
[
1
],
ctl_msg
.
message
,
1
,
0
);
(
int
)
MG_RECV_FUNC
(
mgr
->
ctl
[
1
],
(
char
*
)
&
ctl_msg
,
sizeof
(
ctl_msg
),
0
);
MG_SEND_FUNC
(
mgr
->
ctl
[
1
],
ctl_msg
.
message
,
1
,
0
);
if
(
len
>=
(
int
)
sizeof
(
ctl_msg
.
callback
)
&&
ctl_msg
.
callback
!=
NULL
)
{
struct
mg_connection
*
nc
;
for
(
nc
=
mg_next
(
mgr
,
NULL
);
nc
!=
NULL
;
nc
=
mg_next
(
mgr
,
nc
))
{
...
...
@@ -3187,9 +3187,9 @@ void mg_broadcast(struct mg_mgr *mgr, mg_event_handler_t cb, void *data,
len
<
sizeof
(
ctl_msg
.
message
))
{
ctl_msg
.
callback
=
cb
;
memcpy
(
ctl_msg
.
message
,
data
,
len
);
MG_
EV_
SEND_FUNC
(
mgr
->
ctl
[
0
],
(
char
*
)
&
ctl_msg
,
offsetof
(
struct
ctl_msg
,
message
)
+
len
,
0
);
MG_
EV_
RECV_FUNC
(
mgr
->
ctl
[
0
],
(
char
*
)
&
len
,
1
,
0
);
MG_SEND_FUNC
(
mgr
->
ctl
[
0
],
(
char
*
)
&
ctl_msg
,
offsetof
(
struct
ctl_msg
,
message
)
+
len
,
0
);
MG_RECV_FUNC
(
mgr
->
ctl
[
0
],
(
char
*
)
&
len
,
1
,
0
);
}
}
...
...
mongoose.h
View file @
cbf96873
...
...
@@ -605,11 +605,11 @@ typedef void *SSL_CTX;
#endif
#ifdef MG_USE_READ_WRITE
#define MG_
EV_
RECV_FUNC(s, b, l, f) read(s, b, l)
#define MG_
EV_
SEND_FUNC(s, b, l, f) write(s, b, l)
#define MG_RECV_FUNC(s, b, l, f) read(s, b, l)
#define MG_SEND_FUNC(s, b, l, f) write(s, b, l)
#else
#define MG_
EV_
RECV_FUNC(s, b, l, f) recv(s, b, l, f)
#define MG_
EV_
SEND_FUNC(s, b, l, f) send(s, b, l, f)
#define MG_RECV_FUNC(s, b, l, f) recv(s, b, l, f)
#define MG_SEND_FUNC(s, b, l, f) send(s, b, l, f)
#endif
#ifdef __cplusplus
...
...
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