From d67de10fc236de2f3a67ae6c237756c7deca14de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Sun, 2 May 2004 15:17:39 +0000 Subject: Fix the crash with CDDB queries when server is off-line. Thanks for patch to Dario Nicodemi. CVS patchset: 6473 CVS date: 2004/05/02 15:17:39 --- ChangeLog | 2 ++ src/input/input_cdda.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index cea809025..e7d1db9b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ + * fix possible crash in CDDB queries + xine-lib (1-rc4) * experimental DTS software decoder using libdts * SPU decoder: timestamp handling for NAV packets fixes the menu on the first diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c index 135748ab3..1ad33179a 100644 --- a/src/input/input_cdda.c +++ b/src/input/input_cdda.c @@ -20,7 +20,7 @@ * Compact Disc Digital Audio (CDDA) Input Plugin * by Mike Melanson (melanson@pcisys.net) * - * $Id: input_cdda.c,v 1.51 2004/04/21 16:43:18 komadori Exp $ + * $Id: input_cdda.c,v 1.52 2004/05/02 15:17:39 valtri Exp $ */ #ifdef HAVE_CONFIG_H @@ -1453,7 +1453,7 @@ static int _cdda_cddb_socket_open(cdda_input_plugin_t *this) { fflush(stdout); #endif sock = _x_io_tcp_connect(this->stream, this->cddb.server, this->cddb.port); - if (_x_io_tcp_connect_finish(this->stream, sock, CDDB_TIMEOUT) != XIO_READY) { + if (sock == -1 || _x_io_tcp_connect_finish(this->stream, sock, CDDB_TIMEOUT) != XIO_READY) { xine_log(this->stream->xine, XINE_LOG_MSG, _("%s: can't connect to %s:%d\n"), LOG_MODULE, this->cddb.server, this->cddb.port); lprintf("failed\n"); return -1; -- cgit v1.2.3