mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-24 05:03:17 -05:00
Fix the no-session problem with iTunes 4.7 by counting unique ip addresses rather than sessions in the online user count
This commit is contained in:
parent
a95f75c667
commit
4e07eba759
@ -708,19 +708,18 @@ int config_get_session_count(void) {
|
||||
}
|
||||
|
||||
pcurrent=scan_status.next;
|
||||
while(pcurrent) {
|
||||
if(pcurrent->session != 0) {
|
||||
/* check to see if there is another one before this one */
|
||||
pcheck=scan_status.next;
|
||||
while(pcheck != pcurrent) {
|
||||
if(pcheck->session == pcurrent->session)
|
||||
break;
|
||||
pcheck=pcheck->next;
|
||||
}
|
||||
|
||||
if(pcheck == pcurrent)
|
||||
count++;
|
||||
while(pcurrent) {
|
||||
pcheck=scan_status.next;
|
||||
while(pcheck != pcurrent) {
|
||||
if(strcmp(pcheck->host,pcurrent->host) == 0)
|
||||
break;
|
||||
pcheck=pcheck->next;
|
||||
}
|
||||
|
||||
if(pcheck == pcurrent)
|
||||
count++;
|
||||
|
||||
pcurrent=pcurrent->next;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user