[Asterisk-code-review] app dial/queue/followme: 'I' options to block initial update... (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Wed Oct 10 17:36:32 CDT 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/10286 )

Change subject: app_dial/queue/followme: 'I' options to block initial updates in both directions
......................................................................


Patch Set 3:

> > Modifying ast_party_id_set() will really break things.  You will
 > be
 > > better served
 > > by looking at party_id_build_data() instead.  Make that function
 > > always add
 > > the tag ie with an empty string if the tag string is NULL.
 > 
 > I think modifying party_id_build_data() it's the same as modifying
 > ast_party_id_set().
 > 
 > May be better to set caller_id_tag to empty string only for
 > res_pjsip.
 > For example inside sip_endpoint_apply_handler() could be added
 > if (!endpoint->id.self.tag) {
 > endpoint->id.self.tag=ast_strdup("");
 > }

That makes a lot of sense.

ast_sip_endpoint_alloc() needs to set the tag to an empty ast_strdup() string after calling ast_party_id_init().
caller_id_tag_handler() needs to free the previous tag or we leak memory.  (This would be true if there were more than one callerid_tag in the pjsip.conf endpoint definition anyway.)

Oh gosh: caller_id_handler() needs to free the name.str, and number.str before assigning the new ast_strdup() or we leak memory if there is more than one callerid option in the pjsip.conf endpoint definition.


-- 
To view, visit https://gerrit.asterisk.org/10286
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I6ce9e151a2220ce9e95aa66666933cfb9e2a4a01
Gerrit-Change-Number: 10286
Gerrit-PatchSet: 3
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Alexei Gradinari <alex2grad at gmail.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Wed, 10 Oct 2018 22:36:32 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181010/2c76d6cb/attachment.html>


More information about the asterisk-code-review mailing list