[Asterisk-code-review] acl: Fix allocation related issues. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Thu Nov 16 21:31:59 CST 2017


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

Change subject: acl: Fix allocation related issues.
......................................................................


Patch Set 2: Code-Review-1

(3 comments)

https://gerrit.asterisk.org/#/c/7239/2/main/acl.c
File main/acl.c:

https://gerrit.asterisk.org/#/c/7239/2/main/acl.c@481
PS2, Line 481: 		/* If this fails we set error, is that good enough? */
I think this is good enough.  An allocation error has already generated an ERROR message from the asterisk allocation functions.  PJSIP modules will destroy the config object on error because of the sorcery and config frameworks.  Chan_sip adds an additional log message complaining and keeps on plugging away.  Chan_iax2 and manager don't care about the error and keep plugging away.


https://gerrit.asterisk.org/#/c/7239/2/main/acl.c@570
PS2, Line 570: 	ast_debug(3, "%s/%s sense %u appended to ACL\n",
Unconditionally log this since it is already protected by DEBUG_ATLEAST(3).

ast_log(LOG_DEBUG, "...");


https://gerrit.asterisk.org/#/c/7239/2/main/acl.c@707
PS2, Line 707: 		ast_str_append(buf, 0, "/%s", ast_sockaddr_stringify_addr(&ha->netmask));
Just "%s" since the '/' is in the other ast_str_append().



-- 
To view, visit https://gerrit.asterisk.org/7239
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia19eaaeb0b139ff7ce7b971c7550e85c8b78ab76
Gerrit-Change-Number: 7239
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Fri, 17 Nov 2017 03:31:59 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171116/72075489/attachment.html>


More information about the asterisk-code-review mailing list