]> git.sesse.net Git - vlc/blobdiff - modules/access/mms/mmsh.c
Remove dead RTCP code
[vlc] / modules / access / mms / mmsh.c
index 7c5747af33fa56c35f531f082baf1220e0ca8066..965c7273971a726aad9e87f90716276ae682f26f 100644 (file)
@@ -24,8 +24,6 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#define _GNU_SOURCE
-#include <stdlib.h>
 
 #include <vlc/vlc.h>
 #include <vlc_access.h>
@@ -41,7 +39,6 @@
 #include "mmsh.h"
 
 /* TODO:
- *  - http_proxy
  *  - authentication
  */
 
@@ -104,6 +101,20 @@ int E_(MMSHOpen)( access_t *p_access )
     /* Check proxy */
     /* TODO reuse instead http-proxy from http access ? */
     psz_proxy = var_CreateGetString( p_access, "mmsh-proxy" );
+    if( !*psz_proxy )
+    {
+        char *psz_http_proxy = config_GetPsz( p_access, "http-proxy" );
+        if( psz_http_proxy && *psz_http_proxy )
+        {
+            free( psz_proxy );
+            psz_proxy = psz_http_proxy;
+            var_SetString( p_access, "mmsh-proxy", psz_proxy );
+        }
+        else
+        {
+            free( psz_http_proxy );
+        }
+    }
     if( *psz_proxy )
     {
         p_sys->b_proxy = VLC_TRUE;
@@ -553,7 +564,8 @@ static int Describe( access_t  *p_access, char **ppsz_location )
     p_sys->p_packet = NULL;
     E_( GenerateGuid )( &p_sys->guid );
 
-    OpenConnection( p_access );
+    if( OpenConnection( p_access ) )
+        return VLC_EGENERIC;
 
     net_Printf( VLC_OBJECT(p_access), p_sys->fd, NULL,
                 "Accept: */*\r\n"
@@ -698,6 +710,7 @@ error:
     }
     return VLC_EGENERIC;
 }
+
 static void GetHeader( access_t *p_access )
 {
     access_sys_t *p_sys = p_access->p_sys;
@@ -752,7 +765,8 @@ static int Start( access_t *p_access, off_t i_pos )
         return VLC_EGENERIC;
     }
 
-    OpenConnection( p_access );
+    if( OpenConnection( p_access ) )
+        return VLC_EGENERIC;
 
     net_Printf( VLC_OBJECT(p_access), p_sys->fd, NULL,
                 "Accept: */*\r\n"