[Asterisk-code-review] db: Add AMI action to retrieve DB keys at prefix. (asterisk[master])

Kevin Harwell asteriskteam at digium.com
Tue Jul 12 12:26:24 CDT 2022


Attention is currently required from: N A.
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18785 )

Change subject: db: Add AMI action to retrieve DB keys at prefix.
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

File main/db.c:

https://gerrit.asterisk.org/c/asterisk/+/18785/comment/4d65c66b_ceae4966 
PS1, Line 993: static int manager_db_prefix_get(struct mansession *s, const struct message *m)
This appears to be very similar to the cli database_show command. I wonder, tweaking this here a bit would bring it more in alignment with that, e.g. renaming maybe to DbGetTree, and accepting a family and optional keytree.

Might could then even just call the ast_db_gettree then loop over the result, although that would interject a second loop.


https://gerrit.asterisk.org/c/asterisk/+/18785/comment/83431e7b_48d19b4e 
PS1, Line 1001: 	if (ast_strlen_zero(dbprefix)) {
The CLI database_show command sets the stmt to gettree_all_stmt if prefix is empty. Probably want to do the same here?



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I3be9425e53be71f24303fdd4d2923c14e84337e6
Gerrit-Change-Number: 18785
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Attention: N A <mail at interlinked.x10host.com>
Gerrit-Comment-Date: Tue, 12 Jul 2022 17:26:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220712/d4bb81aa/attachment.html>


More information about the asterisk-code-review mailing list