[sr-dev] [kamailio/kamailio] sca: sca_call_info.c: Remove redundant code (#835)

Kevin Scott Adams notifications at github.com
Fri Oct 28 13:57:04 CEST 2016


- In reviewing the code block that I removed it is actually duplicated
in the sca_create_cononical_aor_for_ua() function which is called from
sca_create_canonical_aor() which is called inside this 'if' block, so
why do it twice. The function sca_get_msg_contact_uri() is also called
in sca_create_cononical_aor_for_ua() but it does not set or pass a
'contact' parameter so we still need it in sca_call_info_update() just
don't need to check for errors because it will error out in
sca_create_cononical_aor_for_ua() and do the same thing.
- Maybe in the long run for the 'contact_uri' parameter, create a second
function or add it as a setable paramter to the
sca_create_cononical_aor_for_ua().
- Code change has been tested and running for about 2 months without
issues.
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/835

-- Commit Summary --

  * sca: sca_call_info.c: Remove redundant code

-- File Changes --

    M modules/sca/sca_call_info.c (32)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/835.patch
https://github.com/kamailio/kamailio/pull/835.diff

-- 
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/835
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20161028/d03cf545/attachment.html>


More information about the sr-dev mailing list