[asterisk-commits] mjordan: branch 11 r381365 - in /branches/11: ./ apps/app_db.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Feb 13 21:48:43 CST 2013
Author: mjordan
Date: Wed Feb 13 21:48:39 2013
New Revision: 381365
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381365
Log:
Don't throw a spurious error when using DBdeltree
The function call ast_db_deltree returns the number of row deleted, or a
negative number if it failed. DBdeltree was treating any non-zero return
as an error, causing a spurious verbose error message to be displayed.
This patch handles the return code of ast_db_deltree correctly.
(closes issue ASTERISK-21070)
Reported by: ianc
patches:
dbdeltree.diff uploaded by ianc (License #5955)
........
Merged revisions 381364 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/11/ (props changed)
branches/11/apps/app_db.c
Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/11/apps/app_db.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/apps/app_db.c?view=diff&rev=381365&r1=381364&r2=381365
==============================================================================
--- branches/11/apps/app_db.c (original)
+++ branches/11/apps/app_db.c Wed Feb 13 21:48:39 2013
@@ -106,13 +106,15 @@
keytree = 0;
}
- if (keytree)
+ if (keytree) {
ast_verb(3, "DBdeltree: family=%s, keytree=%s\n", family, keytree);
- else
+ } else {
ast_verb(3, "DBdeltree: family=%s\n", family);
+ }
- if (ast_db_deltree(family, keytree))
+ if (ast_db_deltree(family, keytree) < 0) {
ast_verb(3, "DBdeltree: Error deleting key from database.\n");
+ }
return 0;
}
More information about the asterisk-commits
mailing list