Module: kamailio Branch: master Commit: 741d39251468429788846c8386f445eeede2f7ba URL: https://github.com/kamailio/kamailio/commit/741d39251468429788846c8386f445ee...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-01-01T14:50:18+01:00
auth_identity: use app name to set curl user agent
---
Modified: src/modules/auth_identity/auth_identity.c
---
Diff: https://github.com/kamailio/kamailio/commit/741d39251468429788846c8386f445ee... Patch: https://github.com/kamailio/kamailio/commit/741d39251468429788846c8386f445ee...
---
diff --git a/src/modules/auth_identity/auth_identity.c b/src/modules/auth_identity/auth_identity.c index 7c14a5c4eb..29b7fa21cc 100644 --- a/src/modules/auth_identity/auth_identity.c +++ b/src/modules/auth_identity/auth_identity.c @@ -208,7 +208,7 @@ static int mod_init(void) return -2; } /* we pass our 'glb_tcert' struct to the callback function */ - if ((iRet=curl_easy_setopt(glb_hcurl, CURLOPT_WRITEDATA, (void *)&glb_tcert.scertpem))!=0) { + if ((iRet=curl_easy_setopt(glb_hcurl, CURLOPT_WRITEDATA, (void *)(&glb_tcert.scertpem)))!=0) { LOG(L_ERR, "AUTH_IDENTITY:mod_init: Unable to set cURL writedata option: %s\n", curl_easy_strerror(iRet)); @@ -220,7 +220,7 @@ static int mod_init(void) } /* some servers don't like requests that are made without a user-agent field, so we provide one */ - if ((iRet=curl_easy_setopt(glb_hcurl, CURLOPT_USERAGENT, "ser-agent/1.0"))!=0) { + if ((iRet=curl_easy_setopt(glb_hcurl, CURLOPT_USERAGENT, NAME "-Agent/1.0"))!=0) { LOG(L_WARN, "AUTH_IDENTITY:mod_init: Unable to set cURL useragent option: %s\n", curl_easy_strerror(iRet));