diff options
author | Michael Kaufmann <mail@michael-kaufmann.ch> | 2017-01-28 19:45:52 +0100 |
---|---|---|
committer | Michael Kaufmann <mail@michael-kaufmann.ch> | 2017-01-28 19:47:08 +0100 |
commit | bcca842e0d2b2a70b776cf888572739bda11dac7 (patch) | |
tree | de226b003cad332bb38080b6250212a83abc5d13 /lib | |
parent | cbd4e1fa0dc77cd65ec09985e979a4be11b60096 (diff) | |
download | curl-bcca842e0d2b2a70b776cf888572739bda11dac7.tar.gz |
polarssl: fix hangs
This bugfix is similar to commit c111178bd4.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vtls/polarssl.c | 8 | ||||
-rw-r--r-- | lib/vtls/polarssl.h | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c index 4bba3e3f2..1a9421d82 100644 --- a/lib/vtls/polarssl.c +++ b/lib/vtls/polarssl.c @@ -816,4 +816,12 @@ void Curl_polarssl_cleanup(void) (void)Curl_polarsslthreadlock_thread_cleanup(); } + +int Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex) +{ + ssl_context *ssl = + (ssl_context *)&conn->ssl[sockindex].ssl; + return ssl->in_msglen != 0; +} + #endif /* USE_POLARSSL */ diff --git a/lib/vtls/polarssl.h b/lib/vtls/polarssl.h index 7098b24a4..47af7b417 100644 --- a/lib/vtls/polarssl.h +++ b/lib/vtls/polarssl.h @@ -31,6 +31,7 @@ /* Called on first use PolarSSL, setup threading if supported */ int Curl_polarssl_init(void); void Curl_polarssl_cleanup(void); +int Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex); CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex); @@ -69,7 +70,7 @@ int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex); #define curlssl_engines_list(x) ((void)x, (struct curl_slist *)NULL) #define curlssl_version Curl_polarssl_version #define curlssl_check_cxn(x) ((void)x, -1) -#define curlssl_data_pending(x,y) ((void)x, (void)y, 0) +#define curlssl_data_pending(x,y) Curl_polarssl_data_pending(x, y) #define curlssl_sha256sum(a,b,c,d) sha256(a,b,c,0) /* This might cause libcurl to use a weeker random! |