Redoing remiss's shout patch. This time, just block on open() instead of

pretending to play while we wait for the connection to timeout.  This
removes the need for timers, and thus removes the now unnecessary
timer_get_runtime_* function(s) from the timer code.

The changes made compared to the pre-patch shout plugin are:
* Block while connecting, timing out after 2 seconds.
* Close the device, and not just the connection, if play returns -1.
* Remove sd->last_err (it's always assigned before use).
* Some minor cleanups.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6555 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
J. Alexander Treuman
2007-06-12 17:58:17 +00:00
parent bd0620ff72
commit 3c5cecb828
3 changed files with 30 additions and 106 deletions

View File

@@ -23,7 +23,6 @@
#include "mpd_types.h"
typedef struct _Timer {
uint64_t start_time;
uint64_t time;
int started;
int rate;
@@ -41,6 +40,4 @@ void timer_add(Timer *timer, int size);
void timer_sync(Timer *timer);
uint64_t timer_get_runtime_us(Timer *timer);
#endif