Skip to content

Commit

Permalink
avoid reuse of name curl_write_callback
Browse files Browse the repository at this point in the history
  • Loading branch information
dvillaume authored Nov 27, 2024
1 parent 0a05af2 commit 6f34e7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/janus_sip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6f34e7c

Please sign in to comment.