[xiph-commits] r10091 - trunk/vorbis-tools/ogg123
conrad at svn.xiph.org
conrad at svn.xiph.org
Wed Sep 28 11:38:05 PDT 2005
Author: conrad
Date: 2005-09-28 11:38:03 -0700 (Wed, 28 Sep 2005)
New Revision: 10091
Modified:
trunk/vorbis-tools/ogg123/ogg123.c
trunk/vorbis-tools/ogg123/status.c
Log:
ensure the return value of ogg123 is always usable; make sure to return a
failure if an error has been flagged. Closes ticket:447 and debian bug #193349
Modified: trunk/vorbis-tools/ogg123/ogg123.c
===================================================================
--- trunk/vorbis-tools/ogg123/ogg123.c 2005-09-28 18:10:25 UTC (rev 10090)
+++ trunk/vorbis-tools/ogg123/ogg123.c 2005-09-28 18:38:03 UTC (rev 10091)
@@ -46,6 +46,7 @@
#include "ogg123.h"
#include "i18n.h"
+extern int exit_status; /* from status.c */
void exit_cleanup ();
void play (char *source_string);
@@ -402,10 +403,9 @@
playlist_array_destroy(playlist_array, items);
- exit (0);
+ exit (exit_status);
}
-
void play (char *source_string)
{
transport_t *transport;
@@ -621,7 +621,7 @@
status_message(1, _("Done."));
if (sig_request.exit)
- exit (0);
+ exit (exit_status);
}
Modified: trunk/vorbis-tools/ogg123/status.c
===================================================================
--- trunk/vorbis-tools/ogg123/status.c 2005-09-28 18:10:25 UTC (rev 10090)
+++ trunk/vorbis-tools/ogg123/status.c 2005-09-28 18:38:03 UTC (rev 10091)
@@ -25,6 +25,7 @@
char temp_buffer[200];
int last_line_len = 0;
int max_verbosity = 0;
+int exit_status = EXIT_SUCCESS;
pthread_mutex_t output_lock = PTHREAD_MUTEX_INITIALIZER;
@@ -449,6 +450,8 @@
pthread_mutex_unlock(&output_lock);
pthread_cleanup_pop(0);
+
+ exit_status = EXIT_FAILURE;
}
@@ -462,4 +465,6 @@
pthread_mutex_unlock(&output_lock);
pthread_cleanup_pop(0);
+
+ exit_status = EXIT_FAILURE;
}
More information about the commits
mailing list