@miconda commented on this pull request.
> @@ -260,6 +263,14 @@ static int mod_init(void)
return -1;
}
}
+ if(_tps_methods_update_time_list.len > 0) {
+ if(parse_methods(
+ &_tps_methods_update_time_list,
&_tps_methods_update_time)
+ < 0) {
+ LM_ERR("failed to parse methods_update_time
parameter\n");
+ return -1;
+ }
+ }
If the `methods_update_time` is set to empty, it is still going to match the
SUBSCRIBE because of:
```
unsigned int _tps_methods_update_time = METHOD_SUBSCRIBE;
```
Is it intended to be so? No way to disable updating record time for all
requests.
> @@ -1854,11 +1854,12 @@ int tps_db_update_dialog(
}
}
if((mode & TPS_DBU_TIME)
- && ((sd->b_tag.len > 0)
- && ((md->direction == TPS_DIR_UPSTREAM)
- &&
(msg->first_line.type == SIP_REQUEST))
- &&
(msg->first_line.u.request.method_value
- == METHOD_SUBSCRIBE))) {
+ && ((sd->b_tag.len > 0) && (msg->first_line.type ==
SIP_REQUEST)
+ && (((md->direction == TPS_DIR_UPSTREAM)
+ &&
(msg->first_line.u.request.method_value
+
== METHOD_SUBSCRIBE))
+ ||
((msg->first_line.u.request.method_value
+ ==
METHOD_INVITE))))) {
With this condition, even the modparam can include any method (e.g., UPDATE,
INFO), the record time update is still limited to INVITE and SUBSCRIBE.
As a matter of fact, I am not sure why SUBSCRIBE direction has to UPSTREAM, is
it done for the response processing? Otherwise the SUBSCRIBE goes DOWNSTREAM. I
haven't coded the part related to presence, and didn't look in the code right
now.
Probably it can be done without direction and just bitmask-matching of the
method id with the parsed parameter value.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4561#pullrequestreview-3694667354
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/4561/review/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!