projects
/
project
/
ustream-ssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2263994
)
polarssl: fix error check on write
author
Felix Fietkau
<
[email protected]
>
Sat, 15 Mar 2014 12:19:01 +0000
(13:19 +0100)
committer
Felix Fietkau
<
[email protected]
>
Sat, 15 Mar 2014 12:19:01 +0000
(13:19 +0100)
Signed-off-by: Felix Fietkau <
[email protected]
>
ustream-polarssl.c
patch
|
blob
|
history
diff --git
a/ustream-polarssl.c
b/ustream-polarssl.c
index 10221d39ad0e2e07c8fd44acebc2fce68268932b..d55fe0439d1a5cf993b15b448fb841438a156350 100644
(file)
--- a/
ustream-polarssl.c
+++ b/
ustream-polarssl.c
@@
-51,12
+51,13
@@
static int s_ustream_read(void *ctx, unsigned char *buf, size_t len)
static int s_ustream_write(void *ctx, const unsigned char *buf, size_t len)
{
struct ustream *s = ctx;
+ int ret;
-
len
= ustream_write(s, (const char *) buf, len, false);
- if (
len
< 0 || s->write_error)
+
ret
= ustream_write(s, (const char *) buf, len, false);
+ if (
ret
< 0 || s->write_error)
return POLARSSL_ERR_NET_SEND_FAILED;
- return
len
;
+ return
ret
;
}
__hidden void ustream_set_io(void *ctx, void *ssl, struct ustream *conn)