Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libwebsockets
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Fork
libwebsockets
Commits
72dba099
Commit
72dba099
authored
9 years ago
by
Andy Green
Browse files
Options
Downloads
Patches
Plain Diff
timeout check take copies since he may be deleted
Signed-off-by:
Andy Green
<
andy.green@linaro.org
>
parent
ed6b3961
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/service.c
+8
-4
8 additions, 4 deletions
lib/service.c
test-server/fuzxy.c
+2
-2
2 additions, 2 deletions
test-server/fuzxy.c
with
10 additions
and
6 deletions
lib/service.c
+
8
−
4
View file @
72dba099
...
@@ -379,9 +379,9 @@ lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd, int t
...
@@ -379,9 +379,9 @@ lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd, int t
lws_sockfd_type
our_fd
=
0
;
lws_sockfd_type
our_fd
=
0
;
struct
lws_tokens
eff_buf
;
struct
lws_tokens
eff_buf
;
unsigned
int
pending
=
0
;
unsigned
int
pending
=
0
;
struct
lws
*
wsi
,
*
wsi1
;
char
draining_flow
=
0
;
char
draining_flow
=
0
;
int
timed_out
=
0
;
int
timed_out
=
0
;
struct
lws
*
wsi
;
time_t
now
;
time_t
now
;
int
n
,
m
;
int
n
,
m
;
int
more
;
int
more
;
...
@@ -411,13 +411,17 @@ lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd, int t
...
@@ -411,13 +411,17 @@ lws_service_fd_tsi(struct lws_context *context, struct lws_pollfd *pollfd, int t
wsi
=
context
->
timeout_list
;
wsi
=
context
->
timeout_list
;
while
(
wsi
)
{
while
(
wsi
)
{
if
(
lws_service_timeout_check
(
wsi
,
(
unsigned
int
)
now
))
/* we have to take copies, because he may be deleted */
wsi1
=
wsi
->
timeout_list
;
m
=
wsi
->
sock
;
if
(
lws_service_timeout_check
(
wsi
,
(
unsigned
int
)
now
))
{
/* he did time out... */
/* he did time out... */
if
(
wsi
->
sock
==
our_fd
)
if
(
m
==
our_fd
)
/* it was the guy we came to service! */
/* it was the guy we came to service! */
timed_out
=
1
;
timed_out
=
1
;
/* he's gone, no need to mark as handled */
/* he's gone, no need to mark as handled */
wsi
=
wsi
->
timeout_list
;
}
wsi
=
wsi1
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
test-server/fuzxy.c
+
2
−
2
View file @
72dba099
...
@@ -277,8 +277,8 @@ struct fuzxy_rule {
...
@@ -277,8 +277,8 @@ struct fuzxy_rule {
};
};
struct
fuzxy_rule
r
=
{
struct
fuzxy_rule
r
=
{
{
"Host:"
,
"
\x0d
"
,
"
\x0d
"
},
{
"Host:"
,
"
\x0d
"
,
"
\xe0\x00
\x0d
"
},
{
5
,
1
,
2
},
{
5
,
1
,
3
},
65536
65536
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment