[Asterisk-code-review] revert deleted files that create 10000 lines of change (asterisk[master])

Alec Davis asteriskteam at digium.com
Sat Jul 23 19:13:19 CDT 2022


Attention is currently required from: Joshua Colp, N A.
Alec Davis has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18829 )

Change subject: revert deleted files that create 10000 lines of change
......................................................................


Patch Set 4:

(5 comments)

Patchset:

PS4: 
Changes as requested, nearly all there.

The only one I'm stuck on, is how to allocate without locks.

Alec


File res/res_redisd.c:

https://gerrit.asterisk.org/c/asterisk/+/18829/comment/6cb366e5_23d31a8c 
PS4, Line 226: 		if (attempt++ < 3) {
> Should this be configurable?
perhaps, but cdr/cdr_tds.c has it this way.


https://gerrit.asterisk.org/c/asterisk/+/18829/comment/a10b64bc_13bf606b 
PS4, Line 245: 	msg = ast_str_create(4096);
> Why 4096? If you set it to a lower initial allocation, it will automatically grow as needed. […]
Done


https://gerrit.asterisk.org/c/asterisk/+/18829/comment/144dd144_56a0563d 
PS4, Line 287: 		strncpy(return_buffer, ast_str_buffer(msg), return_buffer_length);
> Why not make a return buffer optional so the caller doesn't have to allocate one that they'll just e […]
Done


https://gerrit.asterisk.org/c/asterisk/+/18829/comment/aab95894_e15d16e5 
PS4, Line 361: 	if (!(cfg = ao2_alloc(sizeof(*cfg), conf_destructor))) {
> These two things don't need to be allocated with locks
I thought I was doing it the same way as these listed below, I started with res/res_statsd.c thus adopted the method
 
res/res_statsd.c:    if (!(cfg = ao2_alloc(sizeof(*cfg), conf_destructor))) {
res/ari/config.c:       cfg = ao2_alloc_options(sizeof(*cfg), conf_destructor,



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ifdf4d33d2a2a5fd044fac13b201c7437de34ba6a
Gerrit-Change-Number: 18829
Gerrit-PatchSet: 4
Gerrit-Owner: Alec Davis <alec at bdt.co.nz>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: N A <mail at interlinked.x10host.com>
Gerrit-CC: Sean Bright <sean at seanbright.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Comment-Date: Sun, 24 Jul 2022 00:13:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220723/f29fdbdf/attachment.html>


More information about the asterisk-code-review mailing list