[vlc-commits] mms: avoid vlc_url_t copy

Rémi Denis-Courmont git at videolan.org
Sun Mar 5 11:35:45 CET 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar  5 11:55:08 2017 +0200| [416dbc7309a0f2f66f4121ad40f18785d4a4e764] | committer: Rémi Denis-Courmont

mms: avoid vlc_url_t copy

Also remove duplicated error message (net_ConnectTCP prints a better
one).

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

 modules/access/mms/mmsh.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/modules/access/mms/mmsh.c b/modules/access/mms/mmsh.c
index 476a4aa..e9bf623 100644
--- a/modules/access/mms/mmsh.c
+++ b/modules/access/mms/mmsh.c
@@ -473,15 +473,11 @@ static int Reset( access_t *p_access )
 static int OpenConnection( access_t *p_access )
 {
     access_sys_t *p_sys = p_access->p_sys;
-    vlc_url_t    srv = p_sys->b_proxy ? p_sys->proxy : p_sys->url;
+    const vlc_url_t *srv = p_sys->b_proxy ? &p_sys->proxy : &p_sys->url;
 
     if( ( p_sys->fd = net_ConnectTCP( p_access,
-                                      srv.psz_host, srv.i_port ) ) < 0 )
-    {
-        msg_Err( p_access, "cannot connect to %s:%d",
-                 srv.psz_host, srv.i_port );
+                                      srv->psz_host, srv->i_port ) ) < 0 )
         return VLC_EGENERIC;
-    }
 
     if( p_sys->b_proxy )
     {



More information about the vlc-commits mailing list