Skip to content
Snippets Groups Projects
Commit 4fb0e4ef authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

signal: fix includes and debug output

Refs #67228

Change-Id: Ia51c2e789254f9a7349de02c4adf4e132a2bbf6b
parent ca2223a8
No related branches found
No related tags found
No related merge requests found
...@@ -30,18 +30,26 @@ ...@@ -30,18 +30,26 @@
#pragma once #pragma once
#include "dring/callmanager_interface.h" #ifdef HAVE_CONFIG_H
#include "dring/configurationmanager_interface.h" #include "config.h"
#include "dring/presencemanager_interface.h" #endif
#include "callmanager_interface.h"
#include "configurationmanager_interface.h"
#include "presencemanager_interface.h"
#ifdef RING_VIDEO #ifdef RING_VIDEO
#include "dring/videomanager_interface.h" #include "videomanager_interface.h"
#endif // RING_VIDEO #endif
#include "dring.h"
#include "logger.h" #include "logger.h"
#include <exception> #include <exception>
#include <memory> #include <memory>
#include <map>
#include <utility>
#include <string>
namespace ring { namespace ring {
...@@ -55,11 +63,11 @@ extern SignalHandlerMap& getSignalHandlers(); ...@@ -55,11 +63,11 @@ extern SignalHandlerMap& getSignalHandlers();
template <typename Ts, typename ...Args> template <typename Ts, typename ...Args>
static void emitSignal(Args...args) { static void emitSignal(Args...args) {
const auto& handlers = getSignalHandlers(); const auto& handlers = getSignalHandlers();
if (auto cb = *DRing::CallbackWrapper<typename Ts::cb_type> {handlers.at(Ts::name)}) { if (auto cb = *DRing::CallbackWrapper<typename Ts::cb_type>(handlers.at(Ts::name))) {
try { try {
cb(args...); cb(args...);
} catch (std::exception& e) { } catch (std::exception& e) {
RING_ERR("Exception during emit signal %d:\n%s", Ts::name, e.what()); RING_ERR("Exception during emit signal %s:\n%s", Ts::name, e.what());
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment