X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=ustream-io-openssl.c;h=67110550c99926e784ab65cccdfda0eaf0659b27;hb=67aeda4a4207f6ae0bc2efad93f25fd4bc74acb6;hp=41e69f70542b8d64f209925a045a1c3fc6e684a3;hpb=f48abdecd43435809777629e20a257448a68a578;p=project%2Fustream-ssl.git 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);