]> git.sesse.net Git - vlc/blobdiff - src/network/tls.c
Typo
[vlc] / src / network / tls.c
index 3f5a3c992fead7c6fdabe44fbdd337ba277db398..94f09f7ea14a650dff0c337aa5ef36d48acabc00 100644 (file)
  * libvlc interface to the Transport Layer Security (TLS) plugins.
  */
 
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
 #include "libvlc.h"
 
 #include <vlc_tls.h>
@@ -65,11 +69,11 @@ tls_ServerCreate (vlc_object_t *obj, const char *cert_path,
         var_SetString (srv, "tls-x509-key", key_path);
     }
 
-    srv->p_module = module_Need (srv, "tls server", 0, 0);
+    srv->p_module = module_need (srv, "tls server", NULL, false );
     if (srv->p_module == NULL)
     {
         msg_Err (srv, "TLS server plugin not available");
-        vlc_object_destroy (srv);
+        vlc_object_release (srv);
         return NULL;
     }
 
@@ -88,9 +92,8 @@ void tls_ServerDelete (tls_server_t *srv)
     if (srv == NULL)
         return;
 
-    module_Unneed (srv, srv->p_module);
-    vlc_object_detach (srv);
-    vlc_object_destroy (srv);
+    module_unneed (srv, srv->p_module);
+    vlc_object_release (srv);
 }
 
 
@@ -181,11 +184,11 @@ tls_ClientCreate (vlc_object_t *obj, int fd, const char *psz_hostname)
     else
         msg_Dbg (cl, "requested anonymous server");
 
-    cl->p_module = module_Need (cl, "tls client", 0, 0);
+    cl->p_module = module_need (cl, "tls client", NULL, false );
     if (cl->p_module == NULL)
     {
         msg_Err (cl, "TLS client plugin not available");
-        vlc_object_destroy (cl);
+        vlc_object_release (cl);
         return NULL;
     }
 
@@ -203,8 +206,8 @@ tls_ClientCreate (vlc_object_t *obj, int fd, const char *psz_hostname)
     }
     msg_Err (cl, "TLS client session handshake error");
 
-    module_Unneed (cl, cl->p_module);
-    vlc_object_destroy (cl);
+    module_unneed (cl, cl->p_module);
+    vlc_object_release (cl);
     return NULL;
 }
 
@@ -218,7 +221,6 @@ void tls_ClientDelete (tls_session_t *cl)
     if (cl == NULL)
         return;
 
-    module_Unneed (cl, cl->p_module);
-    vlc_object_detach (cl);
-    vlc_object_destroy (cl);
+    module_unneed (cl, cl->p_module);
+    vlc_object_release (cl);
 }