[Asterisk-code-review] ast destroy realtime fields: successful DELETE is treated as... (asterisk[13])

Alexei Gradinari asteriskteam at digium.com
Fri May 18 16:47:36 CDT 2018


Alexei Gradinari has uploaded this change for review. ( https://gerrit.asterisk.org/9015


Change subject: ast_destroy_realtime_fields: successful DELETE is treated as failed
......................................................................

ast_destroy_realtime_fields: successful DELETE is treated as failed

The realtime destroy_func returns the number of rows deleted.
But the function ast_destroy_realtime_fields treats non zero return
value as error.

Change-Id: Ied02b38e8196cb03043e609a0679feebd288d17b
---
M main/config.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/15/9015/1

diff --git a/main/config.c b/main/config.c
index da6d6f1..12f8739 100644
--- a/main/config.c
+++ b/main/config.c
@@ -3577,7 +3577,7 @@
 
 	for (i = 1; ; i++) {
 		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;
 			}
 		} else {

-- 
To view, visit https://gerrit.asterisk.org/9015
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied02b38e8196cb03043e609a0679feebd288d17b
Gerrit-Change-Number: 9015
Gerrit-PatchSet: 1
Gerrit-Owner: Alexei Gradinari <alex2grad at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180518/c684f01a/attachment-0001.html>


More information about the asterisk-code-review mailing list