Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
02982397
Commit
02982397
authored
Nov 02, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print more info out in error messages for shout
git-svn-id:
https://svn.musicpd.org/mpd/trunk@2473
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
2c9b50ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
audioOutput_shout.c
src/audioOutputs/audioOutput_shout.c
+16
-7
No files found.
src/audioOutputs/audioOutput_shout.c
View file @
02982397
...
@@ -212,7 +212,8 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
...
@@ -212,7 +212,8 @@ static int myShout_initDriver(AudioOutput * audioOutput, ConfigParam * param) {
!=
SHOUTERR_SUCCESS
||
!=
SHOUTERR_SUCCESS
||
shout_set_agent
(
sd
->
shoutConn
,
"MPD"
)
!=
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
));
shout_get_error
(
sd
->
shoutConn
));
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
...
@@ -307,10 +308,15 @@ static int myShout_handleError(ShoutData * sd, int err) {
...
@@ -307,10 +308,15 @@ static int myShout_handleError(ShoutData * sd, int err) {
break
;
break
;
case
SHOUTERR_UNCONNECTED
:
case
SHOUTERR_UNCONNECTED
:
case
SHOUTERR_SOCKET
:
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
;
return
-
1
;
default:
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
;
return
-
1
;
}
}
...
@@ -380,17 +386,20 @@ static int myShout_openShoutConn(AudioOutput * audioOutput) {
...
@@ -380,17 +386,20 @@ static int myShout_openShoutConn(AudioOutput * audioOutput) {
ShoutData
*
sd
=
(
ShoutData
*
)
audioOutput
->
data
;
ShoutData
*
sd
=
(
ShoutData
*
)
audioOutput
->
data
;
time_t
t
=
time
(
NULL
);
time_t
t
=
time
(
NULL
);
sd
->
connAttempts
++
;
if
(
t
-
sd
->
lastAttempt
<
CONN_ATTEMPT_INTERVAL
)
{
if
(
t
-
sd
->
lastAttempt
<
CONN_ATTEMPT_INTERVAL
)
{
return
-
1
;
return
-
1
;
}
}
sd
->
connAttempts
++
;
sd
->
lastAttempt
=
t
;
sd
->
lastAttempt
=
t
;
if
(
shout_open
(
sd
->
shoutConn
)
!=
SHOUTERR_SUCCESS
)
{
if
(
shout_open
(
sd
->
shoutConn
)
!=
SHOUTERR_SUCCESS
)
{
ERROR
(
"problem opening connection to shout server (attempt %i):"
ERROR
(
"problem opening connection to shout server %s:%i "
" %s
\n
"
,
sd
->
connAttempts
,
"(attempt %i): %s
\n
"
,
shout_get_host
(
sd
->
shoutConn
),
shout_get_port
(
sd
->
shoutConn
),
sd
->
connAttempts
,
shout_get_error
(
sd
->
shoutConn
));
shout_get_error
(
sd
->
shoutConn
));
return
-
1
;
return
-
1
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment