[asterisk-bugs] [JIRA] (ASTERISK-30001) db: Removing nonexistent entries shows "Database entry removed"

N A (JIRA) noreply at issues.asterisk.org
Thu Mar 31 06:44:29 CDT 2022


N A created ASTERISK-30001:
------------------------------

             Summary: db: Removing nonexistent entries shows "Database entry removed"
                 Key: ASTERISK-30001
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-30001
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: General
    Affects Versions: 18.10.0
            Reporter: N A
            Severity: Trivial


If you try to remove an AstDB entry that doesn't exist from the CLI, you're always told it was deleted:

{noformat}
pbxdev*CLI> database del foo bar
Database entry removed.
pbxdev*CLI> database del foo bar
Database entry removed.
pbxdev*CLI> database del foo bar
Database entry removed.
pbxdev*CLI> database del foo bar
Database entry removed.
{noformat}

(there is no further output, even with core debug 10).

I initially thought that perhaps it simply always says that, but looking at the code, there is a branch to say that the entry didn't exist: https://github.com/asterisk/asterisk/blob/master/main/db.c#L683

So there is a bug with ast_db_del not returning the proper value when entries do not exist.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list