[vlc-commits] tls: improve vlc_tls_(Read|Write) return type

Rémi Denis-Courmont git at videolan.org
Sun Dec 20 23:03:17 CET 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Dec 21 00:00:18 2015 +0200| [09854f8c5d30128e7314f1773288eb11f1f32263] | committer: Rémi Denis-Courmont

tls: improve vlc_tls_(Read|Write) return type

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=09854f8c5d30128e7314f1773288eb11f1f32263
---

 include/vlc_tls.h |    4 ++--
 src/network/tls.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/vlc_tls.h b/include/vlc_tls.h
index 1092efb..059286c 100644
--- a/include/vlc_tls.h
+++ b/include/vlc_tls.h
@@ -91,13 +91,13 @@ VLC_API void vlc_tls_SessionDelete (vlc_tls_t *);
 /**
  * Receives data through a TLS session.
  */
-VLC_API int vlc_tls_Read(vlc_tls_t *, void *buf, size_t len, bool waitall);
+VLC_API ssize_t vlc_tls_Read(vlc_tls_t *, void *buf, size_t len, bool waitall);
 VLC_API char *vlc_tls_GetLine(vlc_tls_t *);
 
 /**
  * Sends data through a TLS session.
  */
-VLC_API int vlc_tls_Write(vlc_tls_t *, const void *buf, size_t len);
+VLC_API ssize_t vlc_tls_Write(vlc_tls_t *, const void *buf, size_t len);
 
 /**
  * Terminates a TLS session.
diff --git a/src/network/tls.c b/src/network/tls.c
index 9ddc8c9..8ef2451 100644
--- a/src/network/tls.c
+++ b/src/network/tls.c
@@ -217,7 +217,7 @@ error:
     return session;
 }
 
-int vlc_tls_Read(vlc_tls_t *session, void *buf, size_t len, bool waitall)
+ssize_t vlc_tls_Read(vlc_tls_t *session, void *buf, size_t len, bool waitall)
 {
     struct pollfd ufd;
 
@@ -250,7 +250,7 @@ int vlc_tls_Read(vlc_tls_t *session, void *buf, size_t len, bool waitall)
     }
 }
 
-int vlc_tls_Write(vlc_tls_t *session, const void *buf, size_t len)
+ssize_t vlc_tls_Write(vlc_tls_t *session, const void *buf, size_t len)
 {
     struct pollfd ufd;
 



More information about the vlc-commits mailing list