[Asterisk-code-review] AMI: be less verbose when adding HTTP headers to AMI/HTTP me... (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Wed Aug 22 17:04:26 CDT 2018


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

Change subject: AMI: be less verbose when adding HTTP headers to AMI/HTTP messages.
......................................................................


Patch Set 3: Code-Review-1

(4 comments)

Minor issue that these extracted functions are internal helper routines that do not need to be made public.

https://gerrit.asterisk.org/#/c/9970/3//COMMIT_MSG
Commit Message:

https://gerrit.asterisk.org/#/c/9970/3//COMMIT_MSG@10
PS3, Line 10: Consolidate the loop into
            : a function, and make this available to other modules that may have the
            : same requirements, and drop the debug/verbose message.
            : 
            : There is a continue on allocation failure (remnant from original loop)
            : that simply skips over memory allocations.  There is no feedback to the
            : caller about this which may be a problem.
Since these are internal helper functions where the caller's don't care about the allocation failures, this is a non-issue and other modules should not be allowed access.


https://gerrit.asterisk.org/#/c/9970/3/include/asterisk/manager.h
File include/asterisk/manager.h:

https://gerrit.asterisk.org/#/c/9970/3/include/asterisk/manager.h@275
PS3, Line 275: *!  * \brief Append additional headers into the message structure from params.  */
             : void astman_append_headers(struct message *m, const struct ast_variable *params);
             : 
             : /*!  * \brief Free headers inside message structure, but not the message structure itself.  */
             : void astman_free_headers(struct message *m);
These are internal helper functions so they should not be made public.


https://gerrit.asterisk.org/#/c/9970/3/main/manager.c
File main/manager.c:

https://gerrit.asterisk.org/#/c/9970/3/main/manager.c@2810
PS3, Line 2810: void astman_append_headers(struct message *m, const struct ast_variable *params)
Make a static function.


https://gerrit.asterisk.org/#/c/9970/3/main/manager.c@2830
PS3, Line 2830: void astman_free_headers(struct message *m)
Make a static function.



-- 
To view, visit https://gerrit.asterisk.org/9970
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: Ic45e673fde05bd544be95ad5cdbc69518207c1a1
Gerrit-Change-Number: 9970
Gerrit-PatchSet: 3
Gerrit-Owner: Jaco Kroon <jaco at uls.co.za>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jaco Kroon <jaco at uls.co.za>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Wed, 22 Aug 2018 22:04:26 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180822/5bbfdd0a/attachment-0001.html>


More information about the asterisk-code-review mailing list