aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs/audioOutput_shout.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-11-02 13:45:38 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-11-02 13:45:38 +0000
commit02982397700a02cb095970023ff9e8618638cc0c (patch)
tree43d651d282d22ad45242058b1bc934c5b660fdcf /src/audioOutputs/audioOutput_shout.c
parent2c9b50cabd5563b0c81ca7cf4893b5ea08c6bc92 (diff)
downloadmpd-02982397700a02cb095970023ff9e8618638cc0c.tar.gz
mpd-02982397700a02cb095970023ff9e8618638cc0c.tar.xz
mpd-02982397700a02cb095970023ff9e8618638cc0c.zip
print more info out in error messages for shout
git-svn-id: https://svn.musicpd.org/mpd/trunk@2473 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/audioOutputs/audioOutput_shout.c')
-rw-r--r--src/audioOutputs/audioOutput_shout.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/audioOutputs/audioOutput_shout.c b/src/audioOutputs/audioOutput_shout.c
index 82c793c99..acd9f96e8 100644
--- a/src/audioOutputs/audioOutput_shout.c
+++ b/src/audioOutputs/audioOutput_shout.c
@@ -212,7 +212,8 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
!= SHOUTERR_SUCCESS ||
shout_set_agent(sd->shoutConn, "MPD") != SHOUTERR_SUCCESS)
{
- ERROR("error configuring shout: %s\n",
+ ERROR("error configuring shout defined at line %i: %s\n",
+ param->line,
shout_get_error(sd->shoutConn));
exit(EXIT_FAILURE);
}
@@ -307,10 +308,15 @@ static int myShout_handleError(ShoutData * sd, int err) {
break;
case SHOUTERR_UNCONNECTED:
case SHOUTERR_SOCKET:
- ERROR("Lost shout connection\n");
+ ERROR("Lost shout connection to %s:%i\n",
+ shout_get_host(sd->shoutConn),
+ shout_get_port(sd->shoutConn));
return -1;
default:
- ERROR("shout: error: %s\n", shout_get_error(sd->shoutConn));
+ ERROR("shout: connection to %s:%i error : %s\n",
+ shout_get_host(sd->shoutConn),
+ shout_get_port(sd->shoutConn),
+ shout_get_error(sd->shoutConn));
return -1;
}
@@ -380,17 +386,20 @@ static int myShout_openShoutConn(AudioOutput * audioOutput) {
ShoutData * sd = (ShoutData *)audioOutput->data;
time_t t = time(NULL);
- sd->connAttempts++;
-
if(t - sd->lastAttempt < CONN_ATTEMPT_INTERVAL) {
return -1;
}
+ sd->connAttempts++;
+
sd->lastAttempt = t;
if(shout_open(sd->shoutConn) != SHOUTERR_SUCCESS) {
- ERROR("problem opening connection to shout server (attempt %i):"
- " %s\n", sd->connAttempts,
+ ERROR("problem opening connection to shout server %s:%i "
+ "(attempt %i): %s\n",
+ shout_get_host(sd->shoutConn),
+ shout_get_port(sd->shoutConn),
+ sd->connAttempts,
shout_get_error(sd->shoutConn));
return -1;
}