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
2436f9d6
Commit
2436f9d6
authored
May 22, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
squashed win32 warnings
parent
2238951c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
mongoose.c
mongoose.c
+9
-4
No files found.
mongoose.c
View file @
2436f9d6
...
...
@@ -874,7 +874,7 @@ int ns_server_poll(struct ns_server *server, int milli) {
if
(
server
->
ctl
[
1
]
!=
INVALID_SOCKET
&&
FD_ISSET
(
server
->
ctl
[
1
],
&
read_set
))
{
struct
ctl_msg
ctl_msg
;
int
len
=
recv
(
server
->
ctl
[
1
],
&
ctl_msg
,
sizeof
(
ctl_msg
),
0
);
int
len
=
recv
(
server
->
ctl
[
1
],
(
char
*
)
&
ctl_msg
,
sizeof
(
ctl_msg
),
0
);
send
(
server
->
ctl
[
1
],
ctl_msg
.
message
,
1
,
0
);
if
(
len
>=
(
int
)
sizeof
(
ctl_msg
.
callback
)
&&
ctl_msg
.
callback
!=
NULL
)
{
ns_iterate
(
server
,
ctl_msg
.
callback
,
ctl_msg
.
message
);
...
...
@@ -992,8 +992,9 @@ void ns_server_wakeup_ex(struct ns_server *server, ns_callback_t cb,
len
<
sizeof
(
ctl_msg
.
message
))
{
ctl_msg
.
callback
=
cb
;
memcpy
(
ctl_msg
.
message
,
data
,
len
);
send
(
server
->
ctl
[
0
],
&
ctl_msg
,
offsetof
(
struct
ctl_msg
,
message
)
+
len
,
0
);
recv
(
server
->
ctl
[
0
],
&
len
,
1
,
0
);
send
(
server
->
ctl
[
0
],
(
char
*
)
&
ctl_msg
,
offsetof
(
struct
ctl_msg
,
message
)
+
len
,
0
);
recv
(
server
->
ctl
[
0
],
(
char
*
)
&
len
,
1
,
0
);
}
}
...
...
@@ -4252,6 +4253,10 @@ static void try_parse(struct connection *conn) {
}
}
static
void
proxy_from_client_to_target_host
(
struct
connection
*
conn
)
{
ns_forward
(
conn
->
ns_conn
,
conn
->
endpoint
.
nc
);
}
static
void
on_recv_data
(
struct
connection
*
conn
)
{
struct
iobuf
*
io
=
&
conn
->
ns_conn
->
recv_iobuf
;
...
...
@@ -4275,7 +4280,7 @@ static void on_recv_data(struct connection *conn) {
}
if
(
conn
->
endpoint_type
==
EP_PROXY
&&
conn
->
endpoint
.
nc
!=
NULL
)
{
ns_forward
(
conn
->
ns_conn
,
conn
->
endpoint
.
nc
);
proxy_from_client_to_target_host
(
conn
);
}
#ifndef MONGOOSE_NO_CGI
if
(
conn
->
endpoint_type
==
EP_CGI
&&
conn
->
endpoint
.
nc
!=
NULL
)
{
...
...
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