Module: kamailio Branch: master Commit: e9cfb2bf5012cdbde36559f615b58e3a556bfc2d URL: https://github.com/kamailio/kamailio/commit/e9cfb2bf5012cdbde36559f615b58e3a...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2017-07-04T11:52:53+02:00
dispatcher: log messages for hashing auth username
---
Modified: src/modules/dispatcher/dispatch.c
---
Diff: https://github.com/kamailio/kamailio/commit/e9cfb2bf5012cdbde36559f615b58e3a... Patch: https://github.com/kamailio/kamailio/commit/e9cfb2bf5012cdbde36559f615b58e3a...
---
diff --git a/src/modules/dispatcher/dispatch.c b/src/modules/dispatcher/dispatch.c index 38a6213de1..155be57ca5 100644 --- a/src/modules/dispatcher/dispatch.c +++ b/src/modules/dispatcher/dispatch.c @@ -1214,12 +1214,16 @@ int ds_hash_authusername(struct sip_msg *msg, unsigned int *hash) LM_ERR("bad parameters\n"); return -1; } + *hash = 0; if(parse_headers(msg, HDR_PROXYAUTH_F, 0) == -1) { LM_ERR("error parsing headers!\n"); return -1; } - if(msg->proxy_auth && !msg->proxy_auth->parsed) - parse_credentials(msg->proxy_auth); + if(msg->proxy_auth && !msg->proxy_auth->parsed) { + if(parse_credentials(msg->proxy_auth)!=0) { + LM_DBG("no parsing for proxy-auth header\n"); + } + } if(msg->proxy_auth && msg->proxy_auth->parsed) { h = msg->proxy_auth; } @@ -1228,8 +1232,11 @@ int ds_hash_authusername(struct sip_msg *msg, unsigned int *hash) LM_ERR("error parsing headers!\n"); return -1; } - if(msg->authorization && !msg->authorization->parsed) - parse_credentials(msg->authorization); + if(msg->authorization && !msg->authorization->parsed) { + if(parse_credentials(msg->authorization)!=0) { + LM_DBG("no parsing for auth header\n"); + } + } if(msg->authorization && msg->authorization->parsed) { h = msg->authorization; }