[vlc-commits] securetransport: Add debug message for shutdown, fix error handling

David Fuhrmann git at videolan.org
Mon Jan 4 17:12:51 CET 2016


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Mon Jan  4 17:03:49 2016 +0100| [2ed3f86a38e71495df8a57e561d2718f42eb2c83] | committer: David Fuhrmann

securetransport: Add debug message for shutdown, fix error handling

errSSLClosedGraceful does not seem to be a valid return code
for this function.

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

 modules/misc/securetransport.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/misc/securetransport.c b/modules/misc/securetransport.c
index cb655b8..3f21a14 100644
--- a/modules/misc/securetransport.c
+++ b/modules/misc/securetransport.c
@@ -505,6 +505,7 @@ static ssize_t st_Recv (vlc_tls_t *session, void *buf, size_t length)
  */
 
 static int st_SessionShutdown (vlc_tls_t *session, bool duplex) {
+    msg_Dbg(session->obj, "shutdown TLS session");
 
     vlc_tls_sys_t *sys = session->sys;
     OSStatus ret = noErr;
@@ -514,7 +515,7 @@ static int st_SessionShutdown (vlc_tls_t *session, bool duplex) {
         ret = SSLClose(sys->p_context);
     }
 
-    if (ret != noErr || ret != errSSLClosedGraceful) {
+    if (ret != noErr) {
         msg_Warn(session->obj, "Cannot close ssl context (%i)", (int)ret);
         return ret;
     }



More information about the vlc-commits mailing list