3
0
Prechádzať zdrojové kódy

WIP Journal mode off, mutexes disabled

Stefan Schmidt 6 rokov pred
rodič
commit
16e01ea1c9

+ 2 - 0
code_boost/src/cxx/pcap_processor.cpp

@@ -1,4 +1,5 @@
 #include "pcap_processor.h"
+#include <sqlite3.h>
 
 using namespace Tins;
 
@@ -7,6 +8,7 @@ using namespace Tins;
  * @param path The path where the PCAP to get analyzed is locatated.
  */
 pcap_processor::pcap_processor(std::string path, std::string extraTests) {
+    sqlite3_config(SQLITE_CONFIG_SINGLETHREAD);
     filePath = path;
     hasUnrecognized = false;
     if(extraTests == "True")

+ 2 - 1
code_boost/src/cxx/statistics_db.cpp

@@ -5,6 +5,7 @@
 #include <fstream>
 #include <unistd.h>
 #include <stdio.h>
+#include <sqlite3.h>
 
 /**
  * Creates a new statistics_db object. Opens an existing database located at database_path. If not existing, creates
@@ -20,7 +21,7 @@ statistics_db::statistics_db(std::string database_path) {
     db.reset(new SQLite::Database(database_path, SQLite::OPEN_CREATE | SQLite::OPEN_READWRITE));
 
     db->exec("PRAGMA synchronous = OFF");
-    db->exec("PRAGMA journal_mode = MEMORY");
+    db->exec("PRAGMA journal_mode = OFF");
     
 
     // Read ports and services into portServices vector