Changeset - b326bca552d7
[Not reviewed]
0 2 0
HanzZ - 13 years ago 2012-04-08 13:53:14
hanzz.k@gmail.com
set sqlite3 as default backend
2 files changed with 9 insertions and 1 deletions:
0 comments (0 inline, 0 general)
include/transport/protocol.proto
Show inline comments
 
@@ -44,6 +44,7 @@ message Login {
 
	required string user = 1;
 
	required string legacyName = 2;
 
	required string password = 3;
 
	repeated string extraFields = 4;
 
}
 

	
 
message Logout {
 
@@ -122,6 +123,10 @@ message FileTransferData {
 
	required bytes data = 2;
 
}
 

	
 
message BackendConfig {
 
	required string config = 1;
 
}
 

	
 
message WrapperMessage {
 
	enum Type { 
 
		TYPE_CONNECTED 				= 1;
 
@@ -152,6 +157,7 @@ message WrapperMessage {
 
		TYPE_FT_PAUSE				= 27;
 
		TYPE_FT_CONTINUE			= 28;
 
		TYPE_EXIT					= 29;
 
		TYPE_BACKEND_CONFIG			= 30;
 
	}
 
	required Type type = 1;
 
	optional bytes payload = 2;
src/storagebackend.cpp
Show inline comments
 
@@ -10,7 +10,8 @@ namespace Transport {
 
StorageBackend *StorageBackend::createBackend(Config *config, std::string &error) {
 
	StorageBackend *storageBackend = NULL;
 
#ifdef WITH_SQLITE
 
	if (CONFIG_STRING(config, "database.type") == "sqlite3") {
 
	if (CONFIG_STRING(config, "database.type") == "sqlite3" ||
 
		(CONFIG_STRING(config, "database.type") == "none" && CONFIG_BOOL(config, "service.server_mode"))) {
 
		storageBackend = new SQLite3Backend(config);
 
	}
 
#else
 
@@ -43,6 +44,7 @@ StorageBackend *StorageBackend::createBackend(Config *config, std::string &error
 
		&& CONFIG_STRING(config, "database.type") != "pqxx" && CONFIG_STRING(config, "database.type") != "none") {
 
		error = "Unknown storage backend " + CONFIG_STRING(config, "database.type");
 
	}
 

	
 
	return storageBackend;
 
}
 

	
0 comments (0 inline, 0 general)