mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
more return code checking
Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
parent
c967906307
commit
1587c5537d
2 changed files with 4 additions and 2 deletions
|
@ -372,7 +372,8 @@ lws_get_addresses(struct lws_context *context, void *ads, char *name,
|
||||||
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;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -322,7 +322,8 @@ int lws_parse(struct lws *wsi, unsigned char c)
|
||||||
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 (lws_parse(wsi, wsi->u.hdr.esc_stash) < 0)
|
if (lws_parse(wsi, wsi->u.hdr.esc_stash) < 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue