player: make sync_update report error

This commit is contained in:
Erik Faye-Lund 2010-05-01 20:14:43 +02:00
parent 5c359b035d
commit bd9408fa85
2 changed files with 4 additions and 4 deletions

View File

@ -230,7 +230,7 @@ static int purge_and_rerequest(struct sync_device *d)
return 0; return 0;
} }
void sync_update(struct sync_device *d, int row) int sync_update(struct sync_device *d, int row)
{ {
if (d->sock == INVALID_SOCKET) { if (d->sock == INVALID_SOCKET) {
d->sock = server_connect(REMOTE_HOST, REMOTE_PORT); d->sock = server_connect(REMOTE_HOST, REMOTE_PORT);
@ -285,11 +285,11 @@ void sync_update(struct sync_device *d, int row)
d->row = row; d->row = row;
} }
} }
return; return 0;
sockerr: sockerr:
d->sock = INVALID_SOCKET; d->sock = INVALID_SOCKET;
return; return 1;
} }
#endif #endif

View File

@ -22,7 +22,7 @@ struct sync_cb {
int (*is_playing)(void *); int (*is_playing)(void *);
}; };
void sync_set_callbacks(struct sync_device *, struct sync_cb *, void *); void sync_set_callbacks(struct sync_device *, struct sync_cb *, void *);
void sync_update(struct sync_device *, int); int sync_update(struct sync_device *, int);
#endif /* !defined(SYNC_PLAYER) */ #endif /* !defined(SYNC_PLAYER) */
const struct sync_track *sync_get_track(struct sync_device *, const char *); const struct sync_track *sync_get_track(struct sync_device *, const char *);