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
46529fd5
Commit
46529fd5
authored
Nov 15, 2015
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused MG_F_DONT_SEND
PUBLISHED_FROM=beaec58b808fb767b7e491d8b5d6b23a6d5e4e0c
parent
c09ba40a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
14 deletions
+10
-14
mongoose.c
mongoose.c
+7
-10
mongoose.h
mongoose.h
+3
-4
No files found.
mongoose.c
View file @
46529fd5
...
...
@@ -1803,7 +1803,7 @@ void to_wchar(const char *path, wchar_t *wbuf, size_t wbuf_len) {
#define _MG_CALLBACK_MODIFIABLE_FLAGS_MASK \
(MG_F_USER_1 | MG_F_USER_2 | MG_F_USER_3 | MG_F_USER_4 | MG_F_USER_5 | \
MG_F_USER_6 | MG_F_WEBSOCKET_NO_DEFRAG | MG_F_SEND_AND_CLOSE | \
MG_F_
DONT_SEND | MG_F_
CLOSE_IMMEDIATELY | MG_F_IS_WEBSOCKET)
MG_F_CLOSE_IMMEDIATELY | MG_F_IS_WEBSOCKET)
#ifndef intptr_t
#define intptr_t long
...
...
@@ -3080,8 +3080,7 @@ void mg_mgr_handle_conn(struct mg_connection *nc, int fd_flags, time_t now) {
if
(
nc
->
flags
&
MG_F_CLOSE_IMMEDIATELY
)
return
;
}
if
((
fd_flags
&
_MG_F_FD_CAN_WRITE
)
&&
!
(
nc
->
flags
&
MG_F_DONT_SEND
)
&&
nc
->
send_mbuf
.
len
>
0
)
{
if
((
fd_flags
&
_MG_F_FD_CAN_WRITE
)
&&
nc
->
send_mbuf
.
len
>
0
)
{
mg_write_to_socket
(
nc
);
}
...
...
@@ -3159,8 +3158,7 @@ void mg_ev_mgr_epoll_set_flags(const struct mg_connection *nc,
if
((
nc
->
flags
&
MG_F_LISTENING
)
||
nc
->
recv_mbuf
.
len
<
nc
->
recv_mbuf_limit
)
{
ev
->
events
|=
EPOLLIN
;
}
if
((
nc
->
flags
&
MG_F_CONNECTING
)
||
(
nc
->
send_mbuf
.
len
>
0
&&
!
(
nc
->
flags
&
MG_F_DONT_SEND
)))
{
if
((
nc
->
flags
&
MG_F_CONNECTING
)
||
(
nc
->
send_mbuf
.
len
>
0
))
{
ev
->
events
|=
EPOLLOUT
;
}
}
...
...
@@ -3345,8 +3343,7 @@ time_t mg_mgr_poll(struct mg_mgr *mgr, int milli) {
}
if
(((
nc
->
flags
&
MG_F_CONNECTING
)
&&
!
(
nc
->
flags
&
MG_F_WANT_READ
))
||
(
nc
->
send_mbuf
.
len
>
0
&&
!
(
nc
->
flags
&
MG_F_CONNECTING
)
&&
!
(
nc
->
flags
&
MG_F_DONT_SEND
)))
{
(
nc
->
send_mbuf
.
len
>
0
&&
!
(
nc
->
flags
&
MG_F_CONNECTING
)))
{
mg_add_to_set
(
nc
->
sock
,
&
write_set
,
&
max_fd
);
mg_add_to_set
(
nc
->
sock
,
&
err_set
,
&
max_fd
);
}
...
...
@@ -5835,11 +5832,11 @@ static void cgi_ev_handler(struct mg_connection *cgi_nc, int ev,
* which changes CODE to 302.
*
* Therefore we do not send the output from the CGI script to the user
* until all CGI headers are
parsed (by setting MG_F_DONT_SEND flag)
.
* until all CGI headers are
received
.
*
* Here we parse the output from the CGI script, and if all headers has
* been received,
amend the reply line, and clear MG_F_DONT_SEND flag,
*
which makes data to be sent to the user
.
* been received,
send appropriate reply line, and forward all
*
received headers to the client
.
*/
if
(
nc
->
flags
&
MG_F_USER_1
)
{
struct
mbuf
*
io
=
&
cgi_nc
->
recv_mbuf
;
...
...
mongoose.h
View file @
46529fd5
...
...
@@ -717,10 +717,9 @@ struct mg_connection {
/* Flags that are settable by user */
#define MG_F_SEND_AND_CLOSE (1 << 10)
/* Push remaining data and close */
#define MG_F_DONT_SEND (1 << 11)
/* Do not send data to peer */
#define MG_F_CLOSE_IMMEDIATELY (1 << 12)
/* Disconnect */
#define MG_F_WEBSOCKET_NO_DEFRAG (1 << 13)
/* Websocket specific */
#define MG_F_DELETE_CHUNK (1 << 14)
/* HTTP specific */
#define MG_F_CLOSE_IMMEDIATELY (1 << 11)
/* Disconnect */
#define MG_F_WEBSOCKET_NO_DEFRAG (1 << 12)
/* Websocket specific */
#define MG_F_DELETE_CHUNK (1 << 13)
/* HTTP specific */
#define MG_F_USER_1 (1 << 20)
/* Flags left for application */
#define MG_F_USER_2 (1 << 21)
...
...
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