Changeset - 110a366bfb86
[Not reviewed]
0 2 0
Jan Kaluza - 13 years ago 2012-11-27 10:50:49
hanzz.k@gmail.com
Added NetworkPlugin::StorageBackendNeeded instead of -2 constant
2 files changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
backends/twitter/main.cpp
Show inline comments
 
@@ -38,13 +38,13 @@ int main (int argc, char* argv[]) {
 

	
 
	StorageBackend *storagebackend;
 
	storagebackend = StorageBackend::createBackend(cfg, error);
 
	if (storagebackend == NULL) {
 
		LOG4CXX_ERROR(logger, "Error creating StorageBackend! " << error);
 
		LOG4CXX_ERROR(logger, "Twitter backend needs storage backend configured to work! " << error);
 
		return -2;
 
		return NetworkPlugin::StorageBackendNeeded;
 
	}
 

	
 
	else if (!storagebackend->connect()) {
 
		LOG4CXX_ERROR(logger, "Can't connect to database!")
 
		return -1;
 
	}
include/transport/networkplugin.h
Show inline comments
 
@@ -32,12 +32,13 @@ namespace Transport {
 

	
 
/// This class is base class for all C++ legacy network plugins. It provides a way to connect 
 
/// Spectrum2 NetworkPluginServer and allows to use high-level API for legacy network plugins
 
/// development.
 
class NetworkPlugin {
 
	public:
 
		enum ExitCode { StorageBackendNeeded = -2 };
 

	
 
		class PluginConfig {
 
			public:
 
				PluginConfig() : m_needPassword(true), m_needRegistration(false) {}
 
				virtual ~PluginConfig() {}
 

	
0 comments (0 inline, 0 general)