Commit d7a9267c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

livehttp: use vlc_strerror_c()

parent 2d79b42d
...@@ -340,7 +340,8 @@ static int CryptSetup( sout_access_out_t *p_access, char *key_file ) ...@@ -340,7 +340,8 @@ static int CryptSetup( sout_access_out_t *p_access, char *key_file )
int keyfd = vlc_open( keyfile, O_RDONLY | O_NONBLOCK ); int keyfd = vlc_open( keyfile, O_RDONLY | O_NONBLOCK );
if( unlikely( keyfd == -1 ) ) if( unlikely( keyfd == -1 ) )
{ {
msg_Err( p_access, "Unable to open keyfile %s: %m", keyfile ); msg_Err( p_access, "Unable to open keyfile %s: %s", keyfile,
vlc_strerror_c(errno) );
free( keyfile ); free( keyfile );
gcry_cipher_close( p_sys->aes_ctx ); gcry_cipher_close( p_sys->aes_ctx );
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -384,7 +385,8 @@ static int LoadCryptFile( sout_access_out_t *p_access ) ...@@ -384,7 +385,8 @@ static int LoadCryptFile( sout_access_out_t *p_access )
if( unlikely( stream == NULL ) ) if( unlikely( stream == NULL ) )
{ {
msg_Err( p_access, "Unable to open keyloadfile %s: %m", p_sys->psz_keyfile ); msg_Err( p_access, "Unable to open keyloadfile %s: %s",
p_sys->psz_keyfile, vlc_strerror_c(errno) );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -393,7 +395,8 @@ static int LoadCryptFile( sout_access_out_t *p_access ) ...@@ -393,7 +395,8 @@ static int LoadCryptFile( sout_access_out_t *p_access )
ssize_t len = getline( &key_uri, &(size_t){0}, stream ); ssize_t len = getline( &key_uri, &(size_t){0}, stream );
if( unlikely( len == -1 ) ) if( unlikely( len == -1 ) )
{ {
msg_Err( p_access, "Cannot read %s: %m", p_sys->psz_keyfile ); msg_Err( p_access, "Cannot read %s: %s", p_sys->psz_keyfile,
vlc_strerror_c(errno) );
clearerr( stream ); clearerr( stream );
fclose( stream ); fclose( stream );
free( key_uri ); free( key_uri );
...@@ -405,7 +408,8 @@ static int LoadCryptFile( sout_access_out_t *p_access ) ...@@ -405,7 +408,8 @@ static int LoadCryptFile( sout_access_out_t *p_access )
len = getline( &key_file, &(size_t){0}, stream ); len = getline( &key_file, &(size_t){0}, stream );
if( unlikely( len == -1 ) ) if( unlikely( len == -1 ) )
{ {
msg_Err( p_access, "Cannot read %s: %m", p_sys->psz_keyfile ); msg_Err( p_access, "Cannot read %s: %s", p_sys->psz_keyfile,
vlc_strerror_c(errno) );
clearerr( stream ); clearerr( stream );
fclose( stream ); fclose( stream );
...@@ -865,7 +869,8 @@ static ssize_t openNextFile( sout_access_out_t *p_access, sout_access_out_sys_t ...@@ -865,7 +869,8 @@ static ssize_t openNextFile( sout_access_out_t *p_access, sout_access_out_sys_t
O_TRUNC, 0666 ); O_TRUNC, 0666 );
if ( fd == -1 ) if ( fd == -1 )
{ {
msg_Err( p_access, "cannot open `%s' (%m)", segment->psz_filename ); msg_Err( p_access, "cannot open `%s' (%s)", segment->psz_filename,
vlc_strerror_c(errno) );
destroySegment( segment ); destroySegment( segment );
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment