From 6f34e7c867c2cbee7a3cb6462df4fb2c8b179191 Mon Sep 17 00:00:00 2001 From: David VILLAUME Date: Wed, 27 Nov 2024 12:22:37 +0100 Subject: [PATCH] avoid reuse of name curl_write_callback --- src/plugins/janus_sip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/janus_sip.c b/src/plugins/janus_sip.c index 4b299febc9..8308ad713f 100644 --- a/src/plugins/janus_sip.c +++ b/src/plugins/janus_sip.c @@ -2921,7 +2921,7 @@ static void janus_sip_hangup_media_internal(janus_plugin_session *handle) { } /* Function called by libcurl to write the data received */ -static size_t curl_write_callback(void *data, size_t size, size_t nmemb, void *userp) { +static size_t curl_write_cb(void *data, size_t size, size_t nmemb, void *userp) { size_t total_size = size * nmemb; struct curl_response_buffer *mem = (struct curl_response_buffer *)userp; @@ -3298,7 +3298,7 @@ static void *janus_sip_handler(void *data) { /* Initialize the memory chunk */ struct curl_response_buffer chunk = {0}; curl_easy_setopt(curl_handle, CURLOPT_URL, url); - curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, curl_write_callback); + curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, curl_write_cb); curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk); curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "Janus SIP Plugin/0.0.9"); curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1L);