]> git.sesse.net Git - vlc/blobdiff - modules/stream_out/raop.c
RAOP: use vlc_strerror_c()
[vlc] / modules / stream_out / raop.c
index 7664615756d070ae35de615f6cbdda76d622f98e..825f42e0e3b8dc3b41a30882b5de2b4f1fa21772 100644 (file)
@@ -1,24 +1,24 @@
 /*****************************************************************************
  * raop.c: Remote Audio Output Protocol streaming support
  *****************************************************************************
- * Copyright (C) 2008 the VideoLAN team
+ * Copyright (C) 2008 VLC authors and VideoLAN
  * $Id$
  *
  * Author: Michael Hanselmann
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
@@ -551,7 +551,8 @@ static char *ReadPasswordFile( vlc_object_t *p_this, const char *psz_path )
     p_file = vlc_fopen( psz_path, "rt" );
     if ( p_file == NULL )
     {
-        msg_Err( p_this, "Unable to open password file '%s': %m", psz_path );
+        msg_Err( p_this, "Unable to open password file '%s': %s", psz_path,
+                 vlc_strerror_c(errno) );
         goto error;
     }
 
@@ -560,7 +561,8 @@ static char *ReadPasswordFile( vlc_object_t *p_this, const char *psz_path )
     {
         if ( ferror( p_file ) )
         {
-            msg_Err( p_this, "Error reading '%s': %m", psz_path );
+            msg_Err( p_this, "Error reading '%s': %s", psz_path,
+                     vlc_strerror_c(errno) );
             goto error;
         }
 
@@ -1390,11 +1392,11 @@ static int Open( vlc_object_t *p_this )
         goto error;
     }
 
-    p_stream->p_sys = p_sys;
     p_stream->pf_add = Add;
     p_stream->pf_del = Del;
     p_stream->pf_send = Send;
-    p_stream->p_sout->i_out_pace_nocontrol++;
+    p_stream->p_sys = p_sys;
+    p_stream->pace_nocontrol = true;
 
     p_sys->i_control_fd = -1;
     p_sys->i_stream_fd = -1;
@@ -1442,8 +1444,8 @@ static int Open( vlc_object_t *p_this )
                                           RAOP_PORT );
     if ( p_sys->i_control_fd < 0 )
     {
-        msg_Err( p_this, "Cannot establish control connection to %s:%d (%m)",
-                 p_sys->psz_host, RAOP_PORT );
+        msg_Err( p_this, "Cannot establish control connection to %s:%d (%s)",
+                 p_sys->psz_host, RAOP_PORT, vlc_strerror_c(errno) );
         i_err = VLC_EGENERIC;
         goto error;
     }
@@ -1526,8 +1528,9 @@ static int Open( vlc_object_t *p_this )
                                          p_sys->i_server_port );
     if ( p_sys->i_stream_fd < 0 )
     {
-        msg_Err( p_this, "Cannot establish stream connection to %s:%d (%m)",
-                 p_sys->psz_host, p_sys->i_server_port );
+        msg_Err( p_this, "Cannot establish stream connection to %s:%d (%s)",
+                 p_sys->psz_host, p_sys->i_server_port,
+                 vlc_strerror_c(errno)  );
         i_err = VLC_EGENERIC;
         goto error;
     }
@@ -1554,8 +1557,6 @@ static void Close( vlc_object_t *p_this )
     SendTeardown( p_this );
 
     FreeSys( p_this, p_sys );
-
-    p_stream->p_sout->i_out_pace_nocontrol--;
 }