[vlc-commits] UPNP: Provide meaningful error messages when initialization fails.

Konstantin Pavlov git at videolan.org
Thu Apr 21 11:52:37 CEST 2011


vlc | branch: master | Konstantin Pavlov <thresh at videolan.org> | Thu Apr 21 13:39:53 2011 +0400| [2e0b8c152e976fa1c2f93bee79dfb68a3c2d07b5] | committer: Konstantin Pavlov

UPNP: Provide meaningful error messages when initialization fails.

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

 modules/services_discovery/upnp.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index ecef74c..ced863e 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -109,7 +109,7 @@ static int Open( vlc_object_t *p_this )
     i_res = UpnpInit( 0, 0 );
     if( i_res != UPNP_E_SUCCESS )
     {
-        msg_Err( p_sd, "%s", UpnpGetErrorMessage( i_res ) );
+        msg_Err( p_sd, "Initialization failed: %s", UpnpGetErrorMessage( i_res ) );
         free( p_sys );
         return VLC_EGENERIC;
     }
@@ -121,7 +121,7 @@ static int Open( vlc_object_t *p_this )
     i_res = UpnpRegisterClient( Callback, p_sd, &p_sys->client_handle );
     if( i_res != UPNP_E_SUCCESS )
     {
-        msg_Err( p_sd, "%s", UpnpGetErrorMessage( i_res ) );
+        msg_Err( p_sd, "Client registration failed: %s", UpnpGetErrorMessage( i_res ) );
         Close( (vlc_object_t*) p_sd );
         return VLC_EGENERIC;
     }



More information about the vlc-commits mailing list