[sr-dev] [kamailio/kamailio] [dialog] stats incremented twice (#1566)

Julien Chavanton notifications at github.com
Mon Jun 18 17:28:31 CEST 2018


Hi Henning, in the end we where calling  `if_update_stat` twice.
This code is only called when retrieving dialog from the DB.

Yes my comment was about removing the optimized version and keeping the simpler one, `if_update_stat` is is a macro calling several inline functions.
One way of calling it was to using a counter when in order to call `if_update_stat` only once.
Then as second call to  `if_update_stat` was added in `b0cd09` probably because the optimization with the counter was obfuscating things slightly.

I think the optimization are not needed the cost per dialog seems very low.
But we could still select to keep the optimized version if we want, knowing that since 2016 both version where used anyway

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1566#issuecomment-398094446
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180618/2d16d4b8/attachment.html>


More information about the sr-dev mailing list