capmt: fix the mutex deadlock in capmt_destroy()
This commit is contained in:
parent
81dd4d1dd0
commit
11bd63d590
1 changed files with 2 additions and 0 deletions
|
@ -1775,6 +1775,7 @@ capmt_destroy(capmt_t *capmt)
|
|||
TAILQ_REMOVE(&capmts, capmt, capmt_link);
|
||||
capmt->capmt_running = 0;
|
||||
pthread_cond_signal(&capmt->capmt_cond);
|
||||
pthread_mutex_unlock(&global_lock);
|
||||
pthread_join(capmt->capmt_tid, NULL);
|
||||
free(capmt->capmt_sockfile);
|
||||
capmt->capmt_sockfile = NULL;
|
||||
|
@ -1784,6 +1785,7 @@ capmt_destroy(capmt_t *capmt)
|
|||
capmt->capmt_oscam,
|
||||
capmt->capmt_oscam == CAPMT_OSCAM_TCP ? "IP address" : "sockfile",
|
||||
capmt->capmt_sockfile, capmt->capmt_port);
|
||||
pthread_mutex_lock(&global_lock);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue