mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-12 15:33:23 -05:00
fix obvious error in thread enumeration
This commit is contained in:
parent
341b3a750d
commit
9f5eabdabf
@ -1259,8 +1259,7 @@ void config_set_status(WS_CONNINFO *pwsc, int session, char *fmt, ...) {
|
|||||||
/* new info */
|
/* new info */
|
||||||
pfirst=(SCAN_STATUS*)malloc(sizeof(SCAN_STATUS));
|
pfirst=(SCAN_STATUS*)malloc(sizeof(SCAN_STATUS));
|
||||||
if(pfirst) {
|
if(pfirst) {
|
||||||
pfirst->what = strdup(buffer);
|
pfirst->what = NULL;
|
||||||
pfirst->session = session;
|
|
||||||
pfirst->thread = pwsc->threadno;
|
pfirst->thread = pwsc->threadno;
|
||||||
pfirst->host = strdup(pwsc->hostname);
|
pfirst->host = strdup(pwsc->hostname);
|
||||||
ws_set_local_storage(pwsc,pfirst,config_freescan);
|
ws_set_local_storage(pwsc,pfirst,config_freescan);
|
||||||
|
@ -1573,14 +1573,16 @@ void ws_set_local_storage(WS_CONNINFO *pwsc, void *ptr, void (*callback)(void *)
|
|||||||
*/
|
*/
|
||||||
WS_CONNINFO *ws_thread_enum_first(WSHANDLE wsh, WSTHREADENUM *vpp) {
|
WS_CONNINFO *ws_thread_enum_first(WSHANDLE wsh, WSTHREADENUM *vpp) {
|
||||||
WS_PRIVATE *pwsp;
|
WS_PRIVATE *pwsp;
|
||||||
WS_CONNINFO *pwsc;
|
WS_CONNINFO *pwsc = NULL;
|
||||||
WS_CONNLIST *pconlist;
|
WS_CONNLIST *pconlist;
|
||||||
|
|
||||||
pwsp = (WS_PRIVATE *)wsh;
|
pwsp = (WS_PRIVATE *)wsh;
|
||||||
ws_lock_connlist(pwsp);
|
ws_lock_connlist(pwsp);
|
||||||
|
|
||||||
pconlist = pwsp->connlist.next;
|
pconlist = pwsp->connlist.next;
|
||||||
|
if(pconlist) {
|
||||||
pwsc = pconlist->pwsc;
|
pwsc = pconlist->pwsc;
|
||||||
|
}
|
||||||
*vpp = (WSTHREADENUM)pconlist;
|
*vpp = (WSTHREADENUM)pconlist;
|
||||||
|
|
||||||
if(pwsc == NULL) {
|
if(pwsc == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user