]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Return error when no rows are deleted for AMI DBDelTree
authorTerry Wilson <twilson@digium.com>
Mon, 10 Oct 2011 23:10:11 +0000 (23:10 +0000)
committerTerry Wilson <twilson@digium.com>
Mon, 10 Oct 2011 23:10:11 +0000 (23:10 +0000)
(closes issue AST-654)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340224 65c4cc65-6c06-0410-ace0-fbb531ad65f3

UPGRADE.txt
main/db.c

index 05df0a1c405318db2fa552ef76616bd87e1f9188..292497fd22f2516e130e3152148c155c9db6f35b 100644 (file)
@@ -36,6 +36,10 @@ Configuration Files:
    - dnsmgr.conf
    - dsp.conf
 
+AMI:
+  - DBDelTree now correctly returns an error when 0 rows are deleted just as
+    the DBDel action does.
+
 SIP
 ===
  - A new option "tonezone" for setting default tonezone for the channel driver
index 67a8ccdb72df64bbb95b222e7fbad3ac802be76c..0a996f84648356649702572a94615c8031834bfe 100644 (file)
--- a/main/db.c
+++ b/main/db.c
@@ -840,7 +840,7 @@ static int manager_dbdeltree(struct mansession *s, const struct message *m)
        else
                res = ast_db_deltree(family, NULL);
 
-       if (res < 0)
+       if (res <= 0)
                astman_send_error(s, m, "Database entry not found");
        else
                astman_send_ack(s, m, "Key tree deleted successfully");