httpd: fix error handling path
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 14 Jan 2009 19:58:51 +0000 (21:58 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 14 Jan 2009 20:21:23 +0000 (22:21 +0200)
src/network/httpd.c

index 4a1ddd0..f913608 100644 (file)
@@ -1073,15 +1073,6 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname,
     if (host == NULL)
         goto error;
 
-    vlc_object_lock( host );
-    if( vlc_object_waitpipe( VLC_OBJECT( host ) ) == -1 )
-    {
-        msg_Err( host, "signaling pipe error: %m" );
-        vlc_object_unlock( host );
-        goto error;
-    }
-    vlc_object_unlock( host );
-
     host->httpd = httpd;
     vlc_mutex_init( &host->lock );
     host->i_ref = 1;
@@ -1094,6 +1085,12 @@ httpd_host_t *httpd_TLSHostNew( vlc_object_t *p_this, const char *psz_hostname,
     }
     for (host->nfd = 0; host->fds[host->nfd] != -1; host->nfd++);
 
+    if( vlc_object_waitpipe( VLC_OBJECT( host ) ) == -1 )
+    {
+        msg_Err( host, "signaling pipe error: %m" );
+        goto error;
+    }
+
     host->i_port = i_port;
     host->psz_hostname = psz_host;