aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-06-25 13:06:54 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-08-28 14:56:55 +0200
commit2568cfed2da753c25adb0b803672ee40e7eb6c65 (patch)
tree382d123e4408dcb6b1e3d55fa83c8055ce2ba1df /lib/vtls
parentb31d1dcddb6dc7a111d2d8a8806c55ab439e76a7 (diff)
vtls: make sure all _data_pending() functions return bool
This patch makes the signature of the _data_pending() functions consistent among the SSL backends, in preparation for unifying the way all SSL backends are accessed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/mbedtls.c2
-rw-r--r--lib/vtls/mbedtls.h2
-rw-r--r--lib/vtls/polarssl.c2
-rw-r--r--lib/vtls/polarssl.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c
index 037babe38..1de4a8783 100644
--- a/lib/vtls/mbedtls.c
+++ b/lib/vtls/mbedtls.c
@@ -1002,7 +1002,7 @@ void Curl_mbedtls_cleanup(void)
(void)Curl_polarsslthreadlock_thread_cleanup();
}
-int Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex)
+bool Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex)
{
return mbedtls_ssl_get_bytes_avail(&conn->ssl[sockindex].ssl) != 0;
}
diff --git a/lib/vtls/mbedtls.h b/lib/vtls/mbedtls.h
index 71d17a491..a8041bc56 100644
--- a/lib/vtls/mbedtls.h
+++ b/lib/vtls/mbedtls.h
@@ -31,7 +31,7 @@
/* Called on first use mbedTLS, setup threading if supported */
int Curl_mbedtls_init(void);
void Curl_mbedtls_cleanup(void);
-int Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex);
+bool Curl_mbedtls_data_pending(const struct connectdata *conn, int sockindex);
CURLcode Curl_mbedtls_connect(struct connectdata *conn, int sockindex);
diff --git a/lib/vtls/polarssl.c b/lib/vtls/polarssl.c
index 669091cb5..8b66a247d 100644
--- a/lib/vtls/polarssl.c
+++ b/lib/vtls/polarssl.c
@@ -865,7 +865,7 @@ void Curl_polarssl_cleanup(void)
}
-int Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex)
+bool Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex)
{
return ssl_get_bytes_avail(&conn->ssl[sockindex].ssl) != 0;
}
diff --git a/lib/vtls/polarssl.h b/lib/vtls/polarssl.h
index 47af7b417..c7b184941 100644
--- a/lib/vtls/polarssl.h
+++ b/lib/vtls/polarssl.h
@@ -31,7 +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);
+bool Curl_polarssl_data_pending(const struct connectdata *conn, int sockindex);
CURLcode Curl_polarssl_connect(struct connectdata *conn, int sockindex);