X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=ustream-ssl.c;h=dd0faf9f7ce3a25f8abf5aef644af334c7247cbf;hb=e5e801ca5d36387f5ce94bbe15b8cc3cd6858cd3;hp=2728e00b5b9e0dd82984a058b3ed8b608a001cea;hpb=ba34903f4163d0650118bee76f012de961951409;p=project%2Fustream-ssl.git diff --git a/ustream-ssl.c b/ustream-ssl.c index 2728e00..dd0faf9 100644 --- a/ustream-ssl.c +++ b/ustream-ssl.c @@ -18,6 +18,7 @@ #include #include +#include #include #include "ustream-ssl.h" @@ -152,7 +153,7 @@ static bool ustream_ssl_poll(struct ustream *s) bool fd_poll; fd_poll = ustream_poll(us->conn); - return __ustream_ssl_poll(s) || fd_poll; + return __ustream_ssl_poll(us->conn) || fd_poll; } static void ustream_ssl_stream_init(struct ustream_ssl *us) @@ -185,6 +186,10 @@ static int _ustream_ssl_init(struct ustream_ssl *us, struct ustream *conn, struc conn->next = &us->stream; ustream_set_io(ctx, us->ssl, conn); ustream_ssl_stream_init(us); + + if (us->server_name) + __ustream_ssl_set_server_name(us); + ustream_ssl_check_conn(us); return 0;