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

Do not exit with VLC error codes

exit() cannot return negative numbers (the high-order bits are ignored).
And anyway, that's not a meanigful place for VLC error codes. It is also
questionable whether we should exit() from LibVLC anyway...
parent 4a24608b
...@@ -641,7 +641,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, ...@@ -641,7 +641,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
{ {
msg_Err( p_libvlc, "D-Bus problem" ); msg_Err( p_libvlc, "D-Bus problem" );
system_End( p_libvlc ); system_End( p_libvlc );
exit( VLC_ETIMEOUT ); exit( 1 );
} }
/* append MRLs */ /* append MRLs */
...@@ -651,7 +651,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, ...@@ -651,7 +651,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
{ {
dbus_message_unref( p_dbus_msg ); dbus_message_unref( p_dbus_msg );
system_End( p_libvlc ); system_End( p_libvlc );
exit( VLC_ENOMEM ); exit( 1 );
} }
b_play = TRUE; b_play = TRUE;
if( config_GetInt( p_libvlc, "playlist-enqueue" ) > 0 ) if( config_GetInt( p_libvlc, "playlist-enqueue" ) > 0 )
...@@ -661,7 +661,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, ...@@ -661,7 +661,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
{ {
dbus_message_unref( p_dbus_msg ); dbus_message_unref( p_dbus_msg );
system_End( p_libvlc ); system_End( p_libvlc );
exit( VLC_ENOMEM ); exit( 1 );
} }
/* send message and get a handle for a reply */ /* send message and get a handle for a reply */
...@@ -671,7 +671,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, ...@@ -671,7 +671,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
msg_Err( p_libvlc, "D-Bus problem" ); msg_Err( p_libvlc, "D-Bus problem" );
dbus_message_unref( p_dbus_msg ); dbus_message_unref( p_dbus_msg );
system_End( p_libvlc ); system_End( p_libvlc );
exit( VLC_ETIMEOUT ); exit( 1 );
} }
if ( NULL == p_dbus_pending ) if ( NULL == p_dbus_pending )
...@@ -679,7 +679,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, ...@@ -679,7 +679,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
msg_Err( p_libvlc, "D-Bus problem" ); msg_Err( p_libvlc, "D-Bus problem" );
dbus_message_unref( p_dbus_msg ); dbus_message_unref( p_dbus_msg );
system_End( p_libvlc ); system_End( p_libvlc );
exit( VLC_ETIMEOUT ); exit( 1 );
} }
dbus_connection_flush( p_conn ); dbus_connection_flush( p_conn );
dbus_message_unref( p_dbus_msg ); dbus_message_unref( p_dbus_msg );
...@@ -690,7 +690,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc, ...@@ -690,7 +690,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
/* bye bye */ /* bye bye */
system_End( p_libvlc ); system_End( p_libvlc );
exit( VLC_SUCCESS ); exit( 0 );
} }
} }
/* we unreference the connection when we've finished with it */ /* we unreference the connection when we've finished with it */
......
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