player: make sync_update report error
This commit is contained in:
parent
5c359b035d
commit
bd9408fa85
@ -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
|
||||||
|
|||||||
@ -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 *);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user