Remove use of SIGUSR1 and pthread_kill to stop threads. Not debugged!
This commit is contained in:
@@ -815,7 +815,8 @@ static abuf_t *buffer_get_frame(rtsp_conn_info *conn) {
|
||||
"from RTSP conversation %d.",
|
||||
conn->connection_number);
|
||||
conn->stop = 1;
|
||||
pthread_kill(conn->thread, SIGUSR1);
|
||||
pthread_cancel(conn->thread);
|
||||
// pthread_kill(conn->thread, SIGUSR1);
|
||||
}
|
||||
}
|
||||
int rco = get_requested_connection_state_to_output();
|
||||
|
||||
@@ -316,8 +316,11 @@ void ask_other_rtsp_conversation_threads_to_stop(pthread_t except_this_thread) {
|
||||
for (i = 0; i < nconns; i++) {
|
||||
if (((except_this_thread == 0) || (pthread_equal(conns[i]->thread, except_this_thread) == 0)) &&
|
||||
(conns[i]->running != 0)) {
|
||||
conns[i]->stop = 1;
|
||||
pthread_kill(conns[i]->thread, SIGUSR1);
|
||||
pthread_cancel(conns[i]->thread);
|
||||
pthread_join(conns[i]->thread,NULL);
|
||||
debug(1,"Connection %d: asked to stop.",conns[i]->connection_number);
|
||||
// conns[i]->stop = 1;
|
||||
// pthread_kill(conns[i]->thread, SIGUSR1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user