00001 /* 00002 * SQLiteConfigure.cpp 00003 * 00004 * Created on: 30.03.2010 00005 * Author: Myrtus 00006 */ 00007 #include "core/SQLiteConfigure.h" 00008 #include <sqlite3.h> 00009 #include <iostream> 00010 #include "ibrcommon/thread/MutexLock.h" 00011 00012 namespace dtn{ 00013 namespace core{ 00014 ibrcommon::Mutex SQLiteConfigure::_mutex; 00015 bool SQLiteConfigure::_isSet; 00016 00017 void SQLiteConfigure::configure(){ 00018 //Configure SQLite Library 00019 ibrcommon::MutexLock lock = ibrcommon::MutexLock(_mutex); 00020 if(_isSet = false){ 00021 // int err = sqlite3_config(SQLITE_CONFIG_SINGLETHREAD); 00022 int err = sqlite3_config(SQLITE_CONFIG_MULTITHREAD); 00023 // int err = sqlite3_config(SQLITE_CONFIG_SERIALIZED); 00024 if(err!=SQLITE_OK){ 00025 std::cerr << "SQLITEConfigure fehlgeschlagen " << err <<std::endl; 00026 } 00027 } 00028 } 00029 } 00030 }
1.7.1