Skip to content

Commit

Permalink
dialog: detailed debug messages when resolving the timeout
Browse files Browse the repository at this point in the history
(cherry picked from commit 20013e4)
  • Loading branch information
miconda committed Mar 27, 2020
1 parent 382e55f commit 18f17c9
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/modules/dialog/dlg_handlers.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 18f17c9

Please sign in to comment.