diff options
author | James Courtier-Dutton <jcdutton@users.sourceforge.net> | 2002-04-29 23:31:59 +0000 |
---|---|---|
committer | James Courtier-Dutton <jcdutton@users.sourceforge.net> | 2002-04-29 23:31:59 +0000 |
commit | 0ec1fddf7f2eaf8eb29123d79e3462e723a37c1d (patch) | |
tree | f421f82664a92fb2568fdbd76c13a31d4db6f5b7 /src/input | |
parent | 7bfed2df7a422912d295348e100c73e8ee388216 (diff) | |
download | xine-lib-0ec1fddf7f2eaf8eb29123d79e3462e723a37c1d.tar.gz xine-lib-0ec1fddf7f2eaf8eb29123d79e3462e723a37c1d.tar.bz2 |
Replace all exit(1) with abort().
xine-lib should really never do an exit or abort, but instead pass back nice error values to the calling application, but until that happens, use abort() as that is tracable with gdb, whereas exit(1) is not backtraceable.
CVS patchset: 1811
CVS date: 2002/04/29 23:31:59
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/input_cda.c | 5 | ||||
-rw-r--r-- | src/input/input_rtp.c | 10 | ||||
-rw-r--r-- | src/input/mms.c | 6 |
3 files changed, 11 insertions, 10 deletions
diff --git a/src/input/input_cda.c b/src/input/input_cda.c index 62759f9e8..59389dd9d 100644 --- a/src/input/input_cda.c +++ b/src/input/input_cda.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_cda.c,v 1.22 2002/04/24 08:12:13 f1rmb Exp $ + * $Id: input_cda.c,v 1.23 2002/04/29 23:31:59 jcdutton Exp $ */ #ifdef HAVE_CONFIG_H @@ -289,7 +289,8 @@ static char *_cda_cddb_get_default_location(void) { * Small sighandler ;-) */ static void die(int signal) { - exit(signal); + printf("Signal %d\n",signal); + abort(); } /* diff --git a/src/input/input_rtp.c b/src/input/input_rtp.c index 114d35e61..3ae00d017 100644 --- a/src/input/input_rtp.c +++ b/src/input/input_rtp.c @@ -165,7 +165,7 @@ static int host_connect_attempt(struct in_addr ia, int port, xine_t *xine) { /* datagram socket */ if (bind(s, (struct sockaddr *)&sin, sizeof(sin))) { LOG_MSG_STDERR(xine, _("bind(): %s.\n"), strerror(errno)); - exit(1); + abort(); } /* multicast ? */ if ((ntohl(sin.sin_addr.s_addr) >> 28) == 0xe) { @@ -184,7 +184,7 @@ static int host_connect_attempt(struct in_addr ia, int port, xine_t *xine) { if (setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP,&mreqn,sizeof(mreqn))) { LOG_MSG_STDERR(xine, _("setsockopt(IP_ADD_MEMBERSHIP) failed (multicast kernel?): %s.\n"), strerror(errno)); - exit(1); + abort(); } } @@ -338,7 +338,7 @@ static int rtp_plugin_open (input_plugin_t *this_gen, char *mrl ) { input_plugin_read_loop, (void *)&this)) != 0) { LOG_MSG_STDERR(this->xine, _("input_rtp: can't create new thread (%s)\n"), strerror(err)); - exit (1); + abort(); } pthread_attr_destroy(&thread_attrs); @@ -528,12 +528,12 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) { input_buffer_t *buf = xine_xmalloc(sizeof(input_buffer_t)); if (!buf) { LOG_MSG_STDERR(xine, _("unable to allocate input buffer.\n")); - exit(1); + abort(); } buf->buf = xine_xmalloc(IBUFFER_SIZE); if (!buf->buf) { LOG_MSG_STDERR(xine, _("unable to allocate input buffer.\n")); - exit(1); + abort(); } buf->next = this->free_buffers; this->free_buffers = buf; diff --git a/src/input/mms.c b/src/input/mms.c index d1ae8558d..578d74dd1 100644 --- a/src/input/mms.c +++ b/src/input/mms.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mms.c,v 1.5 2002/04/28 15:33:06 guenter Exp $ + * $Id: mms.c,v 1.6 2002/04/29 23:31:59 jcdutton Exp $ * * based on work from major mms * utility functions to handle communication with an mms server @@ -777,7 +777,7 @@ static int get_media_packet (mms_t *this) { || (pre_header[5] != 0xfa) || (pre_header[4] != 0xce) ) { printf ("missing signature\n"); - exit (1); + abort(); } @@ -796,7 +796,7 @@ static int get_media_packet (mms_t *this) { return 0; } else if (command != 0x05) { printf ("unknown command %02x\n", command); - exit (1); + abort(); } } |