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

Jaco Kroon asteriskteam at digium.com
Mon Aug 20 09:47:12 CDT 2018


Jaco Kroon 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 2:

(1 comment)

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

https://gerrit.asterisk.org/#/c/9970/1/main/manager.c@7798
PS1, Line 7798: 	for (v = params; v && m.hdrcount < ARRAY_LEN(m.headers); v = v->next) {
              : 		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);
              : 		ast_debug(1, "HTTP Manager add header %s\n", m.headers[m.hdrcount]);
              : 		++m.hdrcount;
              : 	}
> These blocks are now identical (except for the debug level) so probably better to extract into a sep […]
Good spot.  I'll update that and push a new version.



-- 
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: 2
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: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Mon, 20 Aug 2018 14:47:12 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180820/259ccf49/attachment.html>


More information about the asterisk-code-review mailing list