[Asterisk-code-review] app dial/queue/followme: 'I' options to block initial update... (asterisk[13])
Alexei Gradinari
asteriskteam at digium.com
Thu Oct 11 15:46:29 CDT 2018
Alexei Gradinari 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:
> > 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.)
What's the reason to assign empty value before config processing?
If the tag has value then will be ast_strdup()/ast_free()/ast_strdup().
If assign empty value after config processing at sip_endpoint_apply_handler()
then will be only one ast_strdup() in any cases.
> 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.
The next functions leak memory on multi options:
caller_id_handler
caller_id_tag_handler
voicemail_extension_handler
contact_user_handler
--
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: Thu, 11 Oct 2018 20:46:29 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181011/21da4f20/attachment.html>
More information about the asterisk-code-review
mailing list