mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-20 19:53:10 +00:00
config.c: Fix successful DELETE treated as failure
The config engine destroy_func callback function returns the number of rows deleted or -1 on error. But the function ast_destroy_realtime_fields treated non-zero return values as error. ASTERISK-27863 Change-Id: Ied02b38e8196cb03043e609a0679feebd288d17b
This commit is contained in:
@@ -3568,7 +3568,7 @@ int ast_destroy_realtime_fields(const char *family, const char *keyfield, const
|
|||||||
|
|
||||||
for (i = 1; ; i++) {
|
for (i = 1; ; i++) {
|
||||||
if ((eng = find_engine(family, i, db, sizeof(db), table, sizeof(table)))) {
|
if ((eng = find_engine(family, i, db, sizeof(db), table, sizeof(table)))) {
|
||||||
if (eng->destroy_func && !(res = eng->destroy_func(db, table, keyfield, lookup, fields))) {
|
if (eng->destroy_func && ((res = eng->destroy_func(db, table, keyfield, lookup, fields)) >= 0)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user