From d0ffc3e1a512d5816790b66c06017c06241225f8 Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sun, 7 Dec 2014 23:14:02 +0200 Subject: [PATCH] Enabled CURL debug callbacks always. --- discover.c | 8 +++----- rtsp.c | 20 +++----------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/discover.c b/discover.c index 1fcd239..8c7ab3f 100644 --- a/discover.c +++ b/discover.c @@ -199,11 +199,9 @@ void cSatipDiscover::Fetch(const char *urlP) CURLcode res = CURLE_OK; // Verbose output - if (SatipConfig.IsLoggingMode(cSatipConfig::eLoggingModeDebug2)) { - SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_VERBOSE, 1L); - SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGFUNCTION, cSatipDiscover::DebugCallback); - SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGDATA, this); - } + SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_VERBOSE, 1L); + SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGFUNCTION, cSatipDiscover::DebugCallback); + SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGDATA, this); // Set callback SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_WRITEFUNCTION, cSatipDiscover::WriteCallback); diff --git a/rtsp.c b/rtsp.c index f3364cb..2e618b8 100644 --- a/rtsp.c +++ b/rtsp.c @@ -21,11 +21,9 @@ cSatipRtsp::cSatipRtsp(cSatipTunerIf &tunerP) CURLcode res = CURLE_OK; // Verbose output - if (SatipConfig.IsLoggingMode(cSatipConfig::eLoggingModeDebug2)) { - SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_VERBOSE, 1L); - SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGFUNCTION, cSatipRtsp::DebugCallback); - SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGDATA, this); - } + SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_VERBOSE, 1L); + SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGFUNCTION, cSatipRtsp::DebugCallback); + SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGDATA, this); // No progress meter and no signaling SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_NOPROGRESS, 1L); @@ -167,18 +165,6 @@ bool cSatipRtsp::Setup(const char *uriP, int rtpPortP, int rtcpPortP) CURLcode res = CURLE_OK; cString transport = cString::sprintf("RTP/AVP;unicast;client_port=%d-%d", rtpPortP, rtcpPortP); - // Verbose output - if (SatipConfig.IsLoggingMode(cSatipConfig::eLoggingModeDebug2)) { - SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_VERBOSE, 1L); - SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGFUNCTION, cSatipRtsp::DebugCallback); - SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGDATA, this); - } - else { - SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_VERBOSE, 0L); - SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGFUNCTION, NULL); - SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGDATA, NULL); - } - // Setup media stream SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_STREAM_URI, uriP); SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_TRANSPORT, *transport);