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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This project is archived. Its data is
read-only
.
Show more breadcrumbs
Fork
libwebsockets
Commits
496e0af8
Commit
496e0af8
authored
Jan 20, 2016
by
Andy Green
Browse files
Options
Downloads
Patches
Plain Diff
more return code checking
Signed-off-by:
Andy Green
<
andy.green@linaro.org
>
parent
40f4bc9c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/libwebsockets.c
+2
-1
2 additions, 1 deletion
lib/libwebsockets.c
lib/parsers.c
+2
-1
2 additions, 1 deletion
lib/parsers.c
with
4 additions
and
2 deletions
lib/libwebsockets.c
+
2
−
1
View file @
496e0af8
...
@@ -388,7 +388,8 @@ libwebsockets_get_addresses(struct libwebsocket_context *context,
...
@@ -388,7 +388,8 @@ libwebsockets_get_addresses(struct libwebsocket_context *context,
if
(
addr4
.
sin_family
==
AF_UNSPEC
)
if
(
addr4
.
sin_family
==
AF_UNSPEC
)
return
-
1
;
return
-
1
;
lws_plat_inet_ntop
(
AF_INET
,
&
addr4
.
sin_addr
,
rip
,
rip_len
);
if
(
lws_plat_inet_ntop
(
AF_INET
,
&
addr4
.
sin_addr
,
rip
,
rip_len
)
==
NULL
)
return
-
1
;
return
0
;
return
0
;
}
}
...
...
...
...
This diff is collapsed.
Click to expand it.
lib/parsers.c
+
2
−
1
View file @
496e0af8
...
@@ -281,7 +281,8 @@ int libwebsocket_parse(
...
@@ -281,7 +281,8 @@ int libwebsocket_parse(
case
URIES_SEEN_PERCENT_H1
:
case
URIES_SEEN_PERCENT_H1
:
if
(
char_to_hex
(
c
)
<
0
)
{
if
(
char_to_hex
(
c
)
<
0
)
{
/* regurgitate */
/* regurgitate */
issue_char
(
wsi
,
'%'
);
if
(
issue_char
(
wsi
,
'%'
)
<
0
)
return
-
1
;
wsi
->
u
.
hdr
.
ues
=
URIES_IDLE
;
wsi
->
u
.
hdr
.
ues
=
URIES_IDLE
;
/* regurgitate + assess */
/* regurgitate + assess */
if
(
libwebsocket_parse
(
context
,
wsi
,
wsi
->
u
.
hdr
.
esc_stash
)
<
0
)
if
(
libwebsocket_parse
(
context
,
wsi
,
wsi
->
u
.
hdr
.
esc_stash
)
<
0
)
...
...
...
...
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
sign in
to comment