mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-24 22:25:56 -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 */
|
||||
pfirst=(SCAN_STATUS*)malloc(sizeof(SCAN_STATUS));
|
||||
if(pfirst) {
|
||||
pfirst->what = strdup(buffer);
|
||||
pfirst->session = session;
|
||||
pfirst->what = NULL;
|
||||
pfirst->thread = pwsc->threadno;
|
||||
pfirst->host = strdup(pwsc->hostname);
|
||||
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_PRIVATE *pwsp;
|
||||
WS_CONNINFO *pwsc;
|
||||
WS_CONNINFO *pwsc = NULL;
|
||||
WS_CONNLIST *pconlist;
|
||||
|
||||
pwsp = (WS_PRIVATE *)wsh;
|
||||
ws_lock_connlist(pwsp);
|
||||
|
||||
pconlist = pwsp->connlist.next;
|
||||
pwsc = pconlist->pwsc;
|
||||
if(pconlist) {
|
||||
pwsc = pconlist->pwsc;
|
||||
}
|
||||
*vpp = (WSTHREADENUM)pconlist;
|
||||
|
||||
if(pwsc == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user