[Asterisk-code-review] res ari: Remove requirement that body exists when debug is on. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Thu May 3 11:33:12 CDT 2018


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

Change subject: res_ari: Remove requirement that body exists when debug is on.
......................................................................


Patch Set 1: Code-Review-1

(3 comments)

https://gerrit.asterisk.org/#/c/8912/1/res/res_ari.c
File res/res_ari.c:

https://gerrit.asterisk.org/#/c/8912/1/res/res_ari.c@942
PS1, Line 942: 		if (!body) {
             : 			switch (errno) {
Need to set body back to ast_json_null() here so body will be non-NULL again in case the errno is not selected by a case statement.  Who knows how the call to ast_ari_invoke() below is going to behave if body is NULL.

Which with the issue appears to be the case.


https://gerrit.asterisk.org/#/c/8912/1/res/res_ari.c@987
PS1, Line 987: 		if (!buf || (body && !str)) {
This change isn't necessary as body cannot be NULL with the needed change mentioned above.


https://gerrit.asterisk.org/#/c/8912/1/res/res_ari.c@1003
PS1, Line 1003: 		ast_verbose("%sbody:\n%s\n\n", ast_str_buffer(buf), S_OR(str, ""));
str won't be NULL anymore here.



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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I4eef036ad54550a4368118cc348765ecac25e0f8
Gerrit-Change-Number: 8912
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Thu, 03 May 2018 16:33:12 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180503/cf4dc501/attachment.html>


More information about the asterisk-code-review mailing list