Skip to content
Snippets Groups Projects
Commit f3700d73 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

Fix tests, hudson doesn't have a dbus daemon running

parent fdc5ceb6
Branches
Tags
No related merge requests found
......@@ -37,9 +37,15 @@
#include "networkmanager.h"
DBusManager::DBusManager()
: _connected(false)
, _callManager(NULL)
, _configurationManager(NULL)
, _instanceManager(NULL)
#ifdef USE_NETWORKMANAGER
, _networkManager(NULL)
#endif
{
DBus::default_dispatcher = &_dispatcher;
try {
DBus::Connection sessionConnection = DBus::Connection::SessionBus();
sessionConnection.request_name ("org.sflphone.SFLphone");
......@@ -51,6 +57,12 @@ DBusManager::DBusManager()
DBus::Connection systemConnection = DBus::Connection::SystemBus();
_networkManager = new NetworkManager (systemConnection, "/org/freedesktop/NetworkManager", "");
#endif
DBus::default_dispatcher = &_dispatcher;
_connected = true;
} catch (const DBus::Error &err) {
_error("%s: %s\n", err.name(), err.what());
}
}
DBusManager::~DBusManager()
......
......@@ -50,11 +50,16 @@ class DBusManager
return _configurationManager;
};
bool isConnected() const {
return _connected;
}
void exec();
void exit();
static const char* SERVER_NAME;
private:
bool _connected;
CallManager* _callManager;
ConfigurationManager* _configurationManager;
Instance* _instanceManager;
......
......@@ -2147,9 +2147,7 @@ void ManagerImpl::startVoiceMessageNotification (const std::string& accountId,
void ManagerImpl::connectionStatusNotification ()
{
_debug ("Manager: connectionStatusNotification");
if (_dbus.isConnected())
_dbus.getConfigurationManager()->accountsChanged();
}
......@@ -3752,6 +3750,7 @@ std::string ManagerImpl::addAccount (
saveConfig();
if (_dbus.isConnected())
_dbus.getConfigurationManager()->accountsChanged();
return accountID.str();
......@@ -3776,6 +3775,7 @@ void ManagerImpl::removeAccount (const std::string& accountID)
_debug ("REMOVE ACCOUNT");
if (_dbus.isConnected())
_dbus.getConfigurationManager()->accountsChanged();
}
......@@ -4367,5 +4367,3 @@ std::vector<std::string> ManagerImpl::getParticipantList (
return v;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment