X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fustream-ssl.git;a=blobdiff_plain;f=ustream-io-openssl.c;h=67110550c99926e784ab65cccdfda0eaf0659b27;hp=41e69f70542b8d64f209925a045a1c3fc6e684a3;hb=add9c19ae46263e9c2ca85c0baad22cd758f6c63;hpb=f48abdecd43435809777629e20a257448a68a578 diff --git a/ustream-io-openssl.c b/ustream-io-openssl.c index 41e69f7..6711055 100644 --- a/ustream-io-openssl.c +++ b/ustream-io-openssl.c @@ -88,6 +88,9 @@ s_ustream_write(BIO *b, const char *buf, int len) if (!s) return 0; + if (s->write_error) + return len; + return ustream_write(s, buf, len, false); } @@ -135,7 +138,7 @@ static BIO *ustream_bio_new(struct ustream *s) return bio; } -__hidden void ustream_set_io(void *ctx, void *ssl, struct ustream *conn) +__hidden void ustream_set_io(struct ustream_ssl_ctx *ctx, void *ssl, struct ustream *conn) { BIO *bio = ustream_bio_new(conn); SSL_set_bio(ssl, bio, bio);