From: RĂ©mi Denis-Courmont Date: Wed, 14 Jan 2009 19:58:51 +0000 (+0200) Subject: httpd: fix error handling path X-Git-Tag: 1.0.0-pre1~1342 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e9cbd35ba6d5f229bfae9c1c1f0b9559214703a7;p=vlc httpd: fix error handling path --- diff --git a/src/network/httpd.c b/src/network/httpd.c index 4a1ddd0307..f913608e84 100644 --- a/src/network/httpd.c +++ b/src/network/httpd.c @@ -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;