Module: sip-router
Branch: 3.1
Commit: 1b8ad0f91e3f11add4fbfca3861ec1e7d9a88eb9
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1b8ad0f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Mar 24 23:06:17 2011 +0100
tm: enforce AVP_TRACK_TO only for ser-style timer AVPs
- ser used the list of AVPs from track To for geting timer values
- kamailio is using mainly track From for AVPs
- for compatibility reasons, if avp name is given in ser style, enforce
AVPs track To, otherwise use default track (From) if none is specified
- reported by Min Wang
(cherry picked from commit 26f757d0c30db79c92011313e72c6c1d97e64cd0)
---
modules/tm/t_funcs.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/modules/tm/t_funcs.c b/modules/tm/t_funcs.c
index 13e3952..1b43cc1 100644
--- a/modules/tm/t_funcs.c
+++ b/modules/tm/t_funcs.c
@@ -431,6 +431,8 @@ int init_avp_params(char *fr_timer_param, char *fr_inv_timer_param,
"AVP specs \"%s\"\n", fr_timer_param);
return -1;
}
+ /* ser flavour uses the To track of AVPs */
+ fr_timer_avp_type |= AVP_TRACK_TO;
}
}
@@ -462,6 +464,8 @@ int init_avp_params(char *fr_timer_param, char *fr_inv_timer_param,
"AVP specs \"%s\"\n", fr_inv_timer_param);
return -1;
}
+ /* ser flavour uses the To track of AVPs */
+ fr_inv_timer_avp_type |= AVP_TRACK_TO;
}
}
@@ -507,7 +511,7 @@ static inline int avp2timer(unsigned int* timer, int type, int_str
name)
int_str val_istr;
int err;
- avp = search_first_avp( type | AVP_TRACK_TO, name, &val_istr, 0);
+ avp = search_first_avp(type, name, &val_istr, 0);
if (!avp) {
/*
DBG("avp2timer: AVP '%.*s' not found\n", param.s->len,
ZSW(param.s->s));