Remove use of SIGUSR1 and pthread_kill to stop threads. Not debugged!

This commit is contained in:
Mike Brady
2018-07-27 10:58:36 +01:00
parent aa13fd9849
commit 577449dffa
2 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -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();
+5 -2
View File
@@ -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);
}
}
}