[Freeswitch-svn] [commit] r7898 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Mon Mar 17 11:44:10 EDT 2008


Author: anthm
Date: Mon Mar 17 11:44:09 2008
New Revision: 7898

Modified:
   freeswitch/trunk/src/switch_core_db.c

Log:
yay wasim found a bug i can actually fix right away for once

Modified: freeswitch/trunk/src/switch_core_db.c
==============================================================================
--- freeswitch/trunk/src/switch_core_db.c	(original)
+++ freeswitch/trunk/src/switch_core_db.c	Mon Mar 17 11:44:09 2008
@@ -79,12 +79,13 @@
 {
 	int ret = 0;
 	int sane = 100;
+	char *err = NULL;
 
 	while(--sane > 0) {
-		ret = sqlite3_exec(db, sql, callback, data, errmsg);
+		ret = sqlite3_exec(db, sql, callback, data, &err);
 		if (ret == SQLITE_BUSY || ret == SQLITE_LOCKED) {
 			if (sane > 1) {
-				switch_safe_free(*errmsg);
+				switch_safe_free(err);
 				switch_yield(1000);
 				continue;
 			}
@@ -93,6 +94,10 @@
 		}
 	}
 
+	if (err && errmsg) {
+		*errmsg = err;
+	}
+
 	return ret;
 }
 



More information about the Freeswitch-svn mailing list