mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-28 21:18:13 -05:00
[listener] Support passing context arg to listener callbacks
This commit is contained in:
committed by
Alain Nussbaumer
parent
eca99f120a
commit
91175dc905
@@ -999,7 +999,7 @@ pipelist_create(void)
|
||||
// the pipe thread to watch the pipes. If no pipes in library, it will shut down
|
||||
// the pipe thread.
|
||||
static void
|
||||
pipe_listener_cb(short event_mask)
|
||||
pipe_listener_cb(short event_mask, void *ctx)
|
||||
{
|
||||
union pipe_arg *cmdarg;
|
||||
|
||||
@@ -1146,8 +1146,8 @@ init(void)
|
||||
pipe_autostart = cfg_getbool(cfg_getsec(cfg, "library"), "pipe_autostart");
|
||||
if (pipe_autostart)
|
||||
{
|
||||
pipe_listener_cb(0);
|
||||
CHECK_ERR(L_PLAYER, listener_add(pipe_listener_cb, LISTENER_DATABASE));
|
||||
pipe_listener_cb(0, NULL);
|
||||
CHECK_ERR(L_PLAYER, listener_add(pipe_listener_cb, LISTENER_DATABASE, NULL));
|
||||
}
|
||||
|
||||
pipe_sample_rate = cfg_getint(cfg_getsec(cfg, "library"), "pipe_sample_rate");
|
||||
|
||||
Reference in New Issue
Block a user