]> git.ipfire.org Git - thirdparty/asterisk.git/commit
db: Notify user if deleted DB entry didn't exist.
authorNaveen Albert <asterisk@phreaknet.org>
Fri, 1 Apr 2022 19:49:31 +0000 (19:49 +0000)
committerKevin Harwell <kharwell@digium.com>
Fri, 1 Jul 2022 15:15:57 +0000 (10:15 -0500)
commit350ffcb02b1708b0c6e1d4be95f948550e7133cd
tree706e3e4c45f0acc0fafda07c509743c311c99e78
parentb84184545355956669e5ea549c2701241b08ec38
db: Notify user if deleted DB entry didn't exist.

Currently, if using the CLI to delete a DB entry,
"Database entry removed" is always returned,
regardless of whether or not the entry actually
existed in the first place. This meant that users
were never told if entries did not exist.

The same issue occurs if trying to delete a DB key
using AMI.

To address this, new API is added that is more stringent
in deleting values from AstDB, which will not return
success if the value did not exist in the first place,
and will print out specific error details if available.

ASTERISK-30001 #close

Change-Id: Ic84e3eddcd66c7a6ed7fea91cdfd402568378b18
include/asterisk/astdb.h
main/db.c