Skip to content

Commit

Permalink
rtp/rtsp: more debugging in verbose mode
Browse files Browse the repository at this point in the history
  • Loading branch information
abrasive committed Jun 6, 2013
1 parent e1d6d19 commit e15614d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions rtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions rtsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -683,6 +684,7 @@ static void *rtsp_conversation_thread_func(void *vfd) {
}

shutdown:
debug(1, "closing RTSP connection\n");
if (fd > 0)
close(fd);
if (rtsp_playing()) {
Expand All @@ -693,6 +695,7 @@ static void *rtsp_conversation_thread_func(void *vfd) {
}
if (auth_nonce)
free(auth_nonce);
debug(2, "terminating RTSP thread\n");
return NULL;
}

Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit e15614d

Please sign in to comment.