rtp/rtsp: more debugging in verbose mode

This commit is contained in:
James Laird
2013-06-07 01:47:27 +10:00
parent e1d6d19a20
commit e15614d17e
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -164,6 +164,7 @@ void rtp_shutdown(void) {
if (!running)
die("rtp_shutdown called without active stream!");
debug(2, "shutting down RTP thread\n");
please_shutdown = 1;
pthread_kill(rtp_thread, SIGUSR1);
void *retval;
+5
View File
@@ -647,6 +647,7 @@ static void *rtsp_conversation_thread_func(void *vfd) {
int fd = *(int*)vfd;
socklen_t slen = sizeof(conn.remote);
debug(1, "new RTSP connection\n");
fd = accept(fd, (struct sockaddr *)&conn.remote, &slen);
if (fd < 0) {
perror("failed to accept connection");
@@ -683,6 +684,7 @@ respond:
}
shutdown:
debug(1, "closing RTSP connection\n");
if (fd > 0)
close(fd);
if (rtsp_playing()) {
@@ -693,6 +695,7 @@ shutdown:
}
if (auth_nonce)
free(auth_nonce);
debug(2, "terminating RTSP thread\n");
return NULL;
}
@@ -799,6 +802,8 @@ void rtsp_listen_loop(void) {
break;
}
debug(2, "new connection coming.\n");
for (i=0; i<nsock; i++) {
if (FD_ISSET(sockfd[i], &fds)) {
acceptfd = sockfd[i];