From e15614d17ee863b1b9de83b0a14e80bb2be1b984 Mon Sep 17 00:00:00 2001 From: James Laird Date: Fri, 7 Jun 2013 01:47:27 +1000 Subject: [PATCH] rtp/rtsp: more debugging in verbose mode --- rtp.c | 1 + rtsp.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/rtp.c b/rtp.c index b7f42a19..687603b5 100644 --- a/rtp.c +++ b/rtp.c @@ -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; diff --git a/rtsp.c b/rtsp.c index 951020ce..edbcc6ec 100644 --- a/rtsp.c +++ b/rtsp.c @@ -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