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

Sean Bright asteriskteam at digium.com
Thu Aug 23 08:19:59 CDT 2018


Sean Bright 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 4:

(1 comment)

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

https://gerrit.asterisk.org/#/c/9970/4/main/manager.c@2816
PS4, Line 2816: 		hdrlen = strlen(v->name) + strlen(v->value) + 3;
              : 		m->headers[m->hdrcount] = ast_malloc(hdrlen);
              : 		if (!m->headers[m->hdrcount]) {
              : 			/* Allocation failure */
              : 			continue;
              : 		}
              : 		snprintf((char *) m->headers[m->hdrcount], hdrlen, "%s: %s", v->name, v->value);
Most of this could be replaced by switching to ast_asprintf()



-- 
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: 4
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: Thu, 23 Aug 2018 13:19:59 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180823/0c081511/attachment.html>


More information about the asterisk-code-review mailing list