@@ -623,29 +623,25 @@ static void parseSendRequestInternal(
623623 if (callback != NULL ) callback (client , result , 0 , NULL );
624624 return ;
625625 }
626+
626627#if LIBCURL_VERSION_NUM >= 0x072000
627- result = curl_easy_setopt (curl , CURLOPT_XFERINFODATA , (void * )((uintptr_t )secondsSinceBoot ()));
628- if (result != CURLE_OK ) {
629- if (callback != NULL ) callback (client , result , 0 , NULL );
630- return ;
631- }
632- result = curl_easy_setopt (curl , CURLOPT_XFERINFOFUNCTION , parseProgressInternal );
633- if (result != CURLE_OK ) {
634- if (callback != NULL ) callback (client , result , 0 , NULL );
635- return ;
636- }
628+ #define CURLOPT_TRANSFERDATA_MACTHING_LIB CURLOPT_XFERINFODATA
629+ #define CURLOPT_PROGRESSFUNCTION_MATCHING_LIB CURLOPT_XFERINFOFUNCTION
637630#else
638- result = curl_easy_setopt (curl , CURLOPT_PROGRESSDATA , (void * )((uintptr_t )secondsSinceBoot ()));
631+ #define CURLOPT_TRANSFERDATA_MACTHING_LIB CURLOPT_PROGRESSDATA
632+ #define CURLOPT_PROGRESSFUNCTION_MATCHING_LIB CURLOPT_PROGRESSFUNCTION
633+ #endif
634+
635+ result = curl_easy_setopt (curl , CURLOPT_TRANSFERDATA_MACTHING_LIB , (void * )((uintptr_t )secondsSinceBoot ()));
639636 if (result != CURLE_OK ) {
640637 if (callback != NULL ) callback (client , result , 0 , NULL );
641638 return ;
642639 }
643- result = curl_easy_setopt (curl , CURLOPT_PROGRESSFUNCTION , parseProgressInternal );
640+ result = curl_easy_setopt (curl , CURLOPT_PROGRESSFUNCTION_MATCHING_LIB , parseProgressInternal );
644641 if (result != CURLE_OK ) {
645642 if (callback != NULL ) callback (client , result , 0 , NULL );
646643 return ;
647644 }
648- #endif
649645
650646 result = curl_easy_perform (curl );
651647 if (result != CURLE_OK ) {
0 commit comments