Enabled CURL debug callbacks always.

This commit is contained in:
Rolf Ahrenberg 2014-12-07 23:14:02 +02:00
parent 46db1dea11
commit d0ffc3e1a5
2 changed files with 6 additions and 22 deletions

View File

@ -199,11 +199,9 @@ void cSatipDiscover::Fetch(const char *urlP)
CURLcode res = CURLE_OK; CURLcode res = CURLE_OK;
// Verbose output // Verbose output
if (SatipConfig.IsLoggingMode(cSatipConfig::eLoggingModeDebug2)) { SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_VERBOSE, 1L);
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_VERBOSE, 1L); SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGFUNCTION, cSatipDiscover::DebugCallback);
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGFUNCTION, cSatipDiscover::DebugCallback); SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGDATA, this);
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGDATA, this);
}
// Set callback // Set callback
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_WRITEFUNCTION, cSatipDiscover::WriteCallback); SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_WRITEFUNCTION, cSatipDiscover::WriteCallback);

20
rtsp.c
View File

@ -21,11 +21,9 @@ cSatipRtsp::cSatipRtsp(cSatipTunerIf &tunerP)
CURLcode res = CURLE_OK; CURLcode res = CURLE_OK;
// Verbose output // Verbose output
if (SatipConfig.IsLoggingMode(cSatipConfig::eLoggingModeDebug2)) { SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_VERBOSE, 1L);
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_VERBOSE, 1L); SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGFUNCTION, cSatipRtsp::DebugCallback);
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGFUNCTION, cSatipRtsp::DebugCallback); SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGDATA, this);
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_DEBUGDATA, this);
}
// No progress meter and no signaling // No progress meter and no signaling
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_NOPROGRESS, 1L); 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; CURLcode res = CURLE_OK;
cString transport = cString::sprintf("RTP/AVP;unicast;client_port=%d-%d", rtpPortP, rtcpPortP); 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 // Setup media stream
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_STREAM_URI, uriP); SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_STREAM_URI, uriP);
SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_TRANSPORT, *transport); SATIP_CURL_EASY_SETOPT(handleM, CURLOPT_RTSP_TRANSPORT, *transport);