Skip to content

Commit

Permalink
Readd dumpResponseCurlEasyInfo and comment out since it is unused
Browse files Browse the repository at this point in the history
  • Loading branch information
disa6302 committed May 1, 2024
1 parent 68169ed commit 346c5b7
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions src/source/Response.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,80 @@ VOID terminateCurlSession(PCurlResponse pCurlResponse, UINT64 timeout)
}
}

/* UNCOMMENT if required to use for CURL debugging. Not used at the moment.
VOID dumpResponseCurlEasyInfo(PCurlResponse pCurlResponse)
{
DOUBLE time;
curl_off_t value;
CURLcode ret;
if (pCurlResponse != NULL) {
ret = curl_easy_getinfo(pCurlResponse->pCurl, CURLINFO_TOTAL_TIME, &time);
if (ret == CURLE_OK) {
DLOGI("TOTAL_TIME: %f", time);
} else {
DLOGW("Unable to dump TOTAL_TIME");
}
ret = curl_easy_getinfo(pCurlResponse->pCurl, CURLINFO_NAMELOOKUP_TIME, &time);
if (ret == CURLE_OK) {
DLOGI("NAMELOOKUP_TIME: %f", time);
} else {
DLOGW("Unable to dump NAMELOOKUP_TIME");
}
ret = curl_easy_getinfo(pCurlResponse->pCurl, CURLINFO_CONNECT_TIME, &time);
if (ret == CURLE_OK) {
DLOGI("CONNECT_TIME: %f", time);
} else {
DLOGW("Unable to dump CONNECT_TIME");
}
ret = curl_easy_getinfo(pCurlResponse->pCurl, CURLINFO_APPCONNECT_TIME, &time);
if (ret == CURLE_OK) {
DLOGI("APPCONNECT_TIME: %f", time);
} else {
DLOGW("Unable to dump APPCONNECT_TIME");
}
ret = curl_easy_getinfo(pCurlResponse->pCurl, CURLINFO_PRETRANSFER_TIME, &time);
if (ret == CURLE_OK) {
DLOGI("PRETRANSFER_TIME: %f", time);
} else {
DLOGW("Unable to dump PRETRANSFER_TIME");
}
ret = curl_easy_getinfo(pCurlResponse->pCurl, CURLINFO_STARTTRANSFER_TIME, &time);
if (ret == CURLE_OK) {
DLOGI("STARTTRANSFER_TIME: %f", time);
} else {
DLOGW("Unable to dump STARTTRANSFER_TIME");
}
ret = curl_easy_getinfo(pCurlResponse->pCurl, CURLINFO_REDIRECT_TIME, &time);
if (ret == CURLE_OK) {
DLOGI("REDIRECT_TIME: %f", time);
} else {
DLOGW("Unable to dump REDIRECT_TIME");
}
ret = curl_easy_getinfo(pCurlResponse->pCurl, CURLINFO_SPEED_UPLOAD_T, &value);
if (ret == CURLE_OK) {
DLOGI("CURLINFO_SPEED_UPLOAD: %" CURL_FORMAT_CURL_OFF_T, value);
} else {
DLOGW("Unable to dump CURLINFO_SPEED_UPLOAD");
}
ret = curl_easy_getinfo(pCurlResponse->pCurl, CURLINFO_SIZE_UPLOAD_T, &value);
if (ret == CURLE_OK) {
DLOGI("CURLINFO_SIZE_UPLOAD: %" CURL_FORMAT_CURL_OFF_T, value);
} else {
DLOGW("Unable to dump CURLINFO_SIZE_UPLOAD");
}
}
}
*/

SERVICE_CALL_RESULT getServiceCallResultFromCurlStatus(CURLcode curlStatus)
{
switch (curlStatus) {
Expand Down

0 comments on commit 346c5b7

Please sign in to comment.