mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 08:15:02 -05:00
[rcp] bug fix on deinit() - the rcp_session_cleanup() adv the head of list so no need to do again in deinit loop
This commit is contained in:
parent
9c4d246c8b
commit
7d525e4dec
@ -1100,11 +1100,15 @@ rcp_session_free(struct rcp_session *s)
|
||||
free(s);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
rcp_session_cleanup(struct rcp_session *rs)
|
||||
{
|
||||
struct rcp_session *s;
|
||||
|
||||
if (!rs)
|
||||
return;
|
||||
|
||||
if (rs == rcp_sessions)
|
||||
rcp_sessions = rcp_sessions->next;
|
||||
else
|
||||
@ -1113,8 +1117,11 @@ rcp_session_cleanup(struct rcp_session *rs)
|
||||
; /* EMPTY */
|
||||
|
||||
if (!s)
|
||||
DPRINTF(E_WARN, L_RCP, "WARNING: struct rcp_session not found in list; BUG!\n");
|
||||
else
|
||||
{
|
||||
DPRINTF(E_WARN, L_RCP, "WARNING: struct rcp_session (%s at %s) not found in list; BUG!\n", rs->devname, rs->address);
|
||||
return;
|
||||
}
|
||||
|
||||
s->next = rs->next;
|
||||
}
|
||||
|
||||
@ -1354,11 +1361,8 @@ rcp_deinit(void)
|
||||
struct rcp_session *s;
|
||||
|
||||
for (s = rcp_sessions; rcp_sessions; s = rcp_sessions)
|
||||
{
|
||||
rcp_sessions = s->next;
|
||||
rcp_session_cleanup(s);
|
||||
}
|
||||
}
|
||||
|
||||
struct output_definition output_rcp =
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user