Module: kamailio
Branch: master
Commit: 20013e4e2bf1a5d5ce8535e07320dca034639286
URL:
https://github.com/kamailio/kamailio/commit/20013e4e2bf1a5d5ce8535e07320dca…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-03-22T15:05:17+01:00
dialog: detailed debug messages when resolving the timeout
---
Modified: src/modules/dialog/dlg_handlers.c
---
Diff:
https://github.com/kamailio/kamailio/commit/20013e4e2bf1a5d5ce8535e07320dca…
Patch:
https://github.com/kamailio/kamailio/commit/20013e4e2bf1a5d5ce8535e07320dca…
---
diff --git a/src/modules/dialog/dlg_handlers.c b/src/modules/dialog/dlg_handlers.c
index 48899e3215..43e01eece7 100644
--- a/src/modules/dialog/dlg_handlers.c
+++ b/src/modules/dialog/dlg_handlers.c
@@ -674,11 +674,20 @@ inline static int get_dlg_timeout(struct sip_msg *req)
pv_value_t pv_val;
if( timeout_avp ) {
- if ( pv_get_spec_value( req, timeout_avp, &pv_val)==0 &&
- pv_val.flags&PV_VAL_INT && pv_val.ri>0 ) {
- return pv_val.ri;
+ if ( pv_get_spec_value( req, timeout_avp, &pv_val)==0) {
+ if(pv_val.flags&PV_VAL_INT) {
+ if(pv_val.ri>0 ) {
+ return pv_val.ri;
+ } else {
+ LM_DBG("invalid AVP value\n");
+ }
+ } else {
+ LM_DBG("invalid AVP type\n");
+ }
}
- LM_DBG("invalid AVP value, using default timeout\n");
+ LM_DBG("unable to get valid AVP value, using default timeout\n");
+ } else {
+ LM_DBG("using default timeout\n");
}
return default_timeout;
}