[sr-dev] about presence expires_offset

Luis Azedo luis at 2600hz.com
Thu Mar 16 13:06:56 CET 2017


Hi,

the description of "expires_offset" says "The value in seconds that should be subtracted from the expires value when sending a 200OK for a publish"

but this value is used for subscriptions and AFAICT its behaviour is not correct.
when checking expired subscriptions it subtracts the offset from current time instead of adding it.

in update_db_subs_timer_dbonly
...
qcols[0]= &str_expires_col;
qvals[0].type = DB1_INT;
qvals[0].nul = 0;
qvals[0].val.int_val= (int)time(NULL) - expires_offset;
qops[0]= OP_LT;
...

i think the behavior should be to subtract the value when sending the NOTIFY but add (or not use it) when checking for expired records.
if anyone thinks this shouldn't be like this, please comment.
i'll try to create a PR for this if no comments against this.

Thanks


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20170316/b6cdc78e/attachment.html>


More information about the sr-dev mailing list