[Asterisk-code-review] StatsD: Add res statsd compatibility (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Wed Nov 4 06:39:29 CST 2015
Joshua Colp has posted comments on this change.
Change subject: StatsD: Add res_statsd compatibility
......................................................................
Patch Set 1: Code-Review-1
(4 comments)
https://gerrit.asterisk.org/#/c/1561/1/res/res_statsd.c
File res/res_statsd.c:
Line 103: RAII_VAR(struct conf *, cfg, NULL, ao2_cleanup);
: RAII_VAR(struct ast_str *, msg, NULL, ast_free);
Using RAII_VAR here doesn't add much value, you don't have that many return points.
Line 112: cfg = ao2_global_obj_ref(confs);
: conf_server(cfg, &statsd_server);
Should this be moved to below your sample_rate check?
Line 124: cfg = ao2_global_obj_ref(confs);
Leaked reference because of reffing again.
Line 147: ast_debug(6, "send: %s\n", ast_str_buffer(msg));
I think this debug message should be expanded a bit to be more helpful. That's just me though.
--
To view, visit https://gerrit.asterisk.org/1561
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Id6bb53600943d27347d2bcae26c0bd5643567611
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Tyler Cambron <tcambron at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list