mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-21 02:09:11 -05:00
[listener] Support passing context arg to listener callbacks
This commit is contained in:
committed by
Alain Nussbaumer
parent
eca99f120a
commit
91175dc905
@@ -50,7 +50,7 @@ static short websocket_write_events;
|
||||
|
||||
/* Thread: library (the thread the event occurred) */
|
||||
static void
|
||||
listener_cb(short event_mask)
|
||||
listener_cb(short event_mask, void *ctx)
|
||||
{
|
||||
pthread_mutex_lock(&websocket_write_event_lock);
|
||||
websocket_write_events |= event_mask;
|
||||
@@ -416,7 +416,7 @@ static void *
|
||||
websocket(void *arg)
|
||||
{
|
||||
listener_add(listener_cb, LISTENER_UPDATE | LISTENER_DATABASE | LISTENER_PAIRING | LISTENER_SPOTIFY | LISTENER_LASTFM | LISTENER_SPEAKER
|
||||
| LISTENER_PLAYER | LISTENER_OPTIONS | LISTENER_VOLUME | LISTENER_QUEUE);
|
||||
| LISTENER_PLAYER | LISTENER_OPTIONS | LISTENER_VOLUME | LISTENER_QUEUE, NULL);
|
||||
|
||||
while(!websocket_exit)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user