[Asterisk-code-review] res/res_ari: Added ARI resource /ari/channels/{channelId}/rtp_statistics (...asterisk[master])

sungtae kim asteriskteam at digium.com
Wed Mar 13 16:51:52 CDT 2019


sungtae kim has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/11083 )

Change subject: res/res_ari: Added ARI resource /ari/channels/{channelId}/rtp_statistics
......................................................................


Patch Set 9:

(4 comments)

Hi Joshua,

Thank you for your kind reviewing. I've fixed it. :)

https://gerrit.asterisk.org/#/c/11083/9/main/rtp_engine.c 
File main/rtp_engine.c:

https://gerrit.asterisk.org/#/c/11083/9/main/rtp_engine.c@3769 
PS9, Line 3769: 	ret = 0;
> You don't need to set ret = 0; here, for the first thing you can just use ret = instead of ret |=.
I've got it. Fixed it. :)


https://gerrit.asterisk.org/#/c/11083/9/main/rtp_engine.c@3784 
PS9, Line 3784: 		ast_log(LOG_WARNING, "Could not create rtp statistics info.\n");
> I don't think this WARNING is useful. […]
Agree, added channel's unique id info.


https://gerrit.asterisk.org/#/c/11083/9/main/rtp_engine.c@3831 
PS9, Line 3831: 	j_res = ast_rtp_convert_stats_json(&stats);
> In the future you don't need to store things like this in a variable if you are immediately returnin […]
The future is now, fixed it. ;)


https://gerrit.asterisk.org/#/c/11083/7/res/ari/resource_channels.c 
File res/ari/resource_channels.c:

https://gerrit.asterisk.org/#/c/11083/7/res/ari/resource_channels.c@1985 
PS7, Line 1985: 	if (ret == AST_RTP_GLUE_RESULT_FORBID) {
              : 		ast_ari_response_error(response, 404, "Not Found",
              : 			"RTP info not found");
              : 		return;
              : 	}
> Instead of checking if ret == AST_RTP_GLUE_RESULT_FORBID, initialize rtp to NULL, and check if it's  […]
I've got it, fixed it. Thanks. :)



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11083
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I4343eec070438cec13f2a4f22e7fd9e574381376
Gerrit-Change-Number: 11083
Gerrit-PatchSet: 9
Gerrit-Owner: sungtae kim <pchero21 at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua C. Colp <jcolp at digium.com>
Gerrit-Reviewer: sungtae kim <pchero21 at gmail.com>
Gerrit-Comment-Date: Wed, 13 Mar 2019 21:51:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: sungtae kim <pchero21 at gmail.com>
Comment-In-Reply-To: Joshua C. Colp <jcolp at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190313/11390f75/attachment.html>


More information about the asterisk-code-review mailing list