Skip to content

Commit

Permalink
Add an error message if an RTSP thread can not be created.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebrady committed Jan 13, 2019
1 parent 6c912d6 commit 68f20fe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rtsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2590,8 +2590,12 @@ void rtsp_listen_loop(void) {

ret = pthread_create(&conn->thread, NULL, rtsp_conversation_thread_func,
conn); // also acts as a memory barrier
if (ret)
die("Failed to create RTSP receiver thread %d!", conn->connection_number);
if (ret) {
char errorstring[1024];
strerror_r(ret, (char *)errorstring, sizeof(errorstring));
die("Connection %d: cannot create an RTSP conversation thread. Error %d: \"%s\".",
conn->connection_number, ret, (char *)errorstring);
}
debug(3, "Successfully created RTSP receiver thread %d.", conn->connection_number);
conn->running = 1; // this must happen before the thread is tracked
track_thread(conn);
Expand Down

0 comments on commit 68f20fe

Please sign in to comment.