[asterisk-commits] twilson: branch twilson/sqlite3_playground r342011 - in /team/twilson/sqlite3...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Oct 23 12:24:33 CDT 2011
Author: twilson
Date: Sun Oct 23 12:24:28 2011
New Revision: 342011
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=342011
Log:
Make a clear distinction between the internal database and the astdb family
Any module can use the internal database. Only the astdb API will use the astdb family
Modified:
team/twilson/sqlite3_playground/include/asterisk/astdb.h
team/twilson/sqlite3_playground/include/asterisk/config.h
team/twilson/sqlite3_playground/main/config.c
team/twilson/sqlite3_playground/main/realtime_sqlite3.c
Modified: team/twilson/sqlite3_playground/include/asterisk/astdb.h
URL: http://svnview.digium.com/svn/asterisk/team/twilson/sqlite3_playground/include/asterisk/astdb.h?view=diff&rev=342011&r1=342010&r2=342011
==============================================================================
--- team/twilson/sqlite3_playground/include/asterisk/astdb.h (original)
+++ team/twilson/sqlite3_playground/include/asterisk/astdb.h Sun Oct 23 12:24:28 2011
@@ -27,8 +27,6 @@
extern "C" {
#endif
-static const char * const ast_db_engine = "sqlite3";
-static const char * const ast_db_database = "astdb";
static const char * const ast_db_family = "astdb";
static const char * const ast_db_key= "key";
static const char * const ast_db_value = "value";
Modified: team/twilson/sqlite3_playground/include/asterisk/config.h
URL: http://svnview.digium.com/svn/asterisk/team/twilson/sqlite3_playground/include/asterisk/config.h?view=diff&rev=342011&r1=342010&r2=342011
==============================================================================
--- team/twilson/sqlite3_playground/include/asterisk/config.h (original)
+++ team/twilson/sqlite3_playground/include/asterisk/config.h Sun Oct 23 12:24:28 2011
@@ -29,6 +29,9 @@
#include "asterisk/utils.h"
#include "asterisk/inline_api.h"
+
+static const char * const ast_internal_db_engine = "sqlite3";
+static const char * const ast_internal_db_database = "_internal_asterisk_db_";
struct ast_config;
Modified: team/twilson/sqlite3_playground/main/config.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/sqlite3_playground/main/config.c?view=diff&rev=342011&r1=342010&r2=342011
==============================================================================
--- team/twilson/sqlite3_playground/main/config.c (original)
+++ team/twilson/sqlite3_playground/main/config.c Sun Oct 23 12:24:28 2011
@@ -2443,7 +2443,7 @@
va_start(ap, family);
for (i = 1; ; i++) {
if (!(eng = find_engine(family, i, db, sizeof(db), table, sizeof(table)))) {
- append_mapping(family, ast_db_engine, ast_db_database, family, 1, 1);
+ append_mapping(family, ast_internal_db_engine, ast_internal_db_database, family, 1, 1);
if (!(eng = find_engine(family, i, db, sizeof(db), table, sizeof(table)))) {
break;
}
Modified: team/twilson/sqlite3_playground/main/realtime_sqlite3.c
URL: http://svnview.digium.com/svn/asterisk/team/twilson/sqlite3_playground/main/realtime_sqlite3.c?view=diff&rev=342011&r1=342010&r2=342011
==============================================================================
--- team/twilson/sqlite3_playground/main/realtime_sqlite3.c (original)
+++ team/twilson/sqlite3_playground/main/realtime_sqlite3.c Sun Oct 23 12:24:28 2011
@@ -237,7 +237,7 @@
{
struct realtime_sqlite3_db *db = obj;
/* Don't mark the internal db as dirty */
- if (strcasecmp(db->name, ast_db_family)) {
+ if (strcasecmp(db->name, ast_internal_db_database)) {
db->dirty = 1;
}
return CMP_MATCH;
@@ -1099,7 +1099,7 @@
{
struct realtime_sqlite3_db *db;
- if (!(db = realtime_sqlite3_db_alloc(ast_db_family))) {
+ if (!(db = realtime_sqlite3_db_alloc(ast_internal_db_database))) {
return -1;
}
More information about the asterisk-commits
mailing list