[svn-commits] mjordan: trunk r381366 - in /trunk: ./ apps/app_db.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Feb 13 21:49:55 CST 2013
Author: mjordan
Date: Wed Feb 13 21:49:52 2013
New Revision: 381366
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381366
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
........
Merged revisions 381365 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/apps/app_db.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/apps/app_db.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_db.c?view=diff&rev=381366&r1=381365&r2=381366
==============================================================================
--- trunk/apps/app_db.c (original)
+++ trunk/apps/app_db.c Wed Feb 13 21:49:52 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 svn-commits
mailing list