summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-04-23 14:42:40 +0200
committerJiri Moskovcak <jmoskovc@redhat.com>2009-04-23 14:42:40 +0200
commitbcf4c69ca5fdd6489ca1c09890971fc8f647aa1b (patch)
treee5fedc350ae9368faf77360ea4fb3c0f6d264210
parent99047bce024f1d23c953649cf56ff67e754e44ef (diff)
downloadabrt-bcf4c69ca5fdd6489ca1c09890971fc8f647aa1b.tar.gz
abrt-bcf4c69ca5fdd6489ca1c09890971fc8f647aa1b.tar.xz
abrt-bcf4c69ca5fdd6489ca1c09890971fc8f647aa1b.zip
Added intercomm layer so plugins can send various information to the daemon.
-rw-r--r--lib/CommLayer/CommLayer.h7
-rw-r--r--lib/CommLayer/CommLayerInner.cpp28
-rw-r--r--lib/CommLayer/CommLayerInner.h63
-rw-r--r--lib/CommLayer/CommLayerServer.cpp10
-rw-r--r--lib/CommLayer/CommLayerServer.h28
-rw-r--r--lib/CommLayer/CommLayerServerDBus.cpp71
-rw-r--r--lib/CommLayer/CommLayerServerDBus.h6
-rw-r--r--lib/CommLayer/CommLayerServerSocket.cpp4
-rw-r--r--lib/CommLayer/CommLayerServerSocket.h2
-rw-r--r--lib/CommLayer/Makefile.am3
-rw-r--r--lib/CommLayer/Observer.h16
-rw-r--r--src/Daemon/CrashWatcher.cpp108
-rw-r--r--src/Daemon/CrashWatcher.h17
-rw-r--r--src/Daemon/Makefile.am4
-rw-r--r--src/Daemon/exported-symbols3
15 files changed, 271 insertions, 99 deletions
diff --git a/lib/CommLayer/CommLayer.h b/lib/CommLayer/CommLayer.h
new file mode 100644
index 0000000..19c0aa7
--- /dev/null
+++ b/lib/CommLayer/CommLayer.h
@@ -0,0 +1,7 @@
+#ifndef COMMLAYER_H_
+#define COMMLAYER_H_
+
+#include "CommLayerInner.h"
+extern "C" CCommLayerInner* get_commlayer();
+
+#endif /* COMMLAYER_H_ */
diff --git a/lib/CommLayer/CommLayerInner.cpp b/lib/CommLayer/CommLayerInner.cpp
new file mode 100644
index 0000000..41fd3c1
--- /dev/null
+++ b/lib/CommLayer/CommLayerInner.cpp
@@ -0,0 +1,28 @@
+#include "CommLayerInner.h"
+
+CCommLayerInner::CCommLayerInner(CObserver *pObs)
+: DEBUGINFO(pObs),
+ WARNING(pObs),
+ STATUS(pObs)
+{
+ m_pObs = pObs;
+}
+
+CCommLayerInner::~CCommLayerInner()
+{
+}
+
+CDebug& CCommLayerInner::Debug()
+{
+ return DEBUGINFO;
+}
+
+CWarning& CCommLayerInner::Warning()
+{
+ return WARNING;
+}
+
+CStatusUpdate& CCommLayerInner::Status()
+{
+ return STATUS;
+}
diff --git a/lib/CommLayer/CommLayerInner.h b/lib/CommLayer/CommLayerInner.h
new file mode 100644
index 0000000..2cca935
--- /dev/null
+++ b/lib/CommLayer/CommLayerInner.h
@@ -0,0 +1,63 @@
+#ifndef COMMLAYERINNER_H_
+#define COMMLAYERINNER_H_
+
+#include <iostream>
+#include "Observer.h"
+
+class CDebug
+{
+ private:
+ CObserver *m_pObs;
+ public:
+ CDebug(CObserver *pObs){ m_pObs = pObs; }
+
+ void operator << (const std::string& pMsg)
+ {
+ if(m_pObs)
+ m_pObs->Debug(pMsg);
+ }
+};
+
+class CWarning
+{
+ private:
+ CObserver *m_pObs;
+ public:
+ CWarning(CObserver *pObs){ m_pObs = pObs; }
+
+ void operator << (const std::string& pMsg)
+ {
+ if(m_pObs)
+ m_pObs->Warning(pMsg);
+ }
+};
+
+class CStatusUpdate
+{
+ private:
+ CObserver *m_pObs;
+ public:
+ CStatusUpdate(CObserver *pObs){ m_pObs = pObs; }
+
+ void operator << (const std::string& pMsg)
+ {
+ if(m_pObs)
+ m_pObs->StatusUpdate(pMsg);
+ }
+};
+
+class CCommLayerInner{
+ private:
+ CObserver *m_pObs;
+ public:
+ CDebug DEBUGINFO;
+ CWarning WARNING;
+ CStatusUpdate STATUS;
+ CCommLayerInner(CObserver *pObs);
+ ~CCommLayerInner();
+ CDebug& Debug();
+ CWarning& Warning();
+ CStatusUpdate& Status();
+};
+
+#endif /* COMMLAYERINNER_H_ */
diff --git a/lib/CommLayer/CommLayerServer.cpp b/lib/CommLayer/CommLayerServer.cpp
index 1ebae6d..271f753 100644
--- a/lib/CommLayer/CommLayerServer.cpp
+++ b/lib/CommLayer/CommLayerServer.cpp
@@ -1,30 +1,24 @@
#include "CommLayerServer.h"
#include <iostream>
-CCommLayerServer::CCommLayerServer(CMiddleWare *pMW)
+CCommLayerServer::CCommLayerServer()
{
- m_pMW = pMW;
- std::cerr << "CCommLayerServer init.." << std::endl;
}
CCommLayerServer::~CCommLayerServer()
{
- std::cout << "CCommLayerServer::Cleaning up.." << std::endl;
}
void CCommLayerServer::Attach(CObserver *pObs)
{
- std::cerr << "CCommLayerServer::Attach" << std::endl;
m_pObserver = pObs;
}
void CCommLayerServer::Detach(CObserver *pObs)
{
- std::cerr << "CCommLayerServer::Detach" << std::endl;
m_pObserver = NULL;
}
void CCommLayerServer::Notify(const std::string& pMessage)
{
- std::cerr << "CCommLayerServer::Notify" << std::endl;
if(m_pObserver)
- m_pObserver->Update(pMessage);
+ m_pObserver->StatusUpdate(pMessage);
}
diff --git a/lib/CommLayer/CommLayerServer.h b/lib/CommLayer/CommLayerServer.h
index fc76cc9..f781813 100644
--- a/lib/CommLayer/CommLayerServer.h
+++ b/lib/CommLayer/CommLayerServer.h
@@ -1,10 +1,13 @@
+#ifndef COMMLAYERSERVER_H_
+#define COMMLAYERSERVER_H_
+
#include <vector>
#include <map>
#include <string>
#include <sstream>
#include <iostream>
-#include "MiddleWare.h"
#include "Observer.h"
+#include "CrashTypes.h"
/* just a helper function */
template< class T >
@@ -16,29 +19,32 @@ to_string( T x )
return o.str();
}
+
class CCommLayerServer{
- private:
+ protected:
/* FIXME more observers? */
//std::vector<Observer *obs>;
CObserver *m_pObserver;
public:
- CMiddleWare *m_pMW;
- CCommLayerServer(CMiddleWare *pMW);
+ //CMiddleWare *m_pMW;
+ //CCommLayerServer(CMiddleWare *pMW);
+ CCommLayerServer();
virtual ~CCommLayerServer();
/* observer */
void Attach(CObserver *pObs);
void Detach(CObserver *pObs);
void Notify(const std::string& pMessage);
- /*
- virtual dbus_vector_crash_infos_t GetCrashInfos(const std::string &pUID) = 0;
- virtual dbus_vector_map_crash_infos_t GetCrashInfosMap(const std::string &pDBusSender) = 0;
- virtual dbus_map_report_info_t CreateReport(const std::string &pUUID,const std::string &pDBusSender) = 0;
- virtual bool Report(dbus_map_report_info_t pReport) = 0;
- virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pDBusSender) = 0;
- */
+
+ virtual vector_crash_infos_t GetCrashInfos(const std::string &pDBusSender) = 0;
+ virtual map_crash_report_t CreateReport(const std::string &pUUID,const std::string &pDBusSender) = 0;
+ virtual bool Report(map_crash_report_t pReport) = 0;
+ virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pDBusSender) = 0;
+
public:
/* just stubs to be called when not implemented in specific comm layer */
virtual void Crash(const std::string& arg1) {}
virtual void AnalyzeComplete(map_crash_report_t arg1) {}
virtual void Error(const std::string& arg1) {}
};
+
+#endif //COMMLAYERSERVER_H_
diff --git a/lib/CommLayer/CommLayerServerDBus.cpp b/lib/CommLayer/CommLayerServerDBus.cpp
index b4df14b..b9024f6 100644
--- a/lib/CommLayer/CommLayerServerDBus.cpp
+++ b/lib/CommLayer/CommLayerServerDBus.cpp
@@ -11,91 +11,52 @@ DBus::Connection *CCommLayerServerDBus::init_dbus(CCommLayerServerDBus *self)
return server->m_pConn;
}
-CCommLayerServerDBus::CCommLayerServerDBus(CMiddleWare *pMW)
-: CCommLayerServer(pMW),
+CCommLayerServerDBus::CCommLayerServerDBus()
+: CCommLayerServer(),
DBus::ObjectAdaptor(*init_dbus(this), CC_DBUS_PATH)
{
- std::cerr << "CCommLayerDBus init.." << std::endl;
- m_pConn->request_name(CC_DBUS_NAME);
+ try
+ {
+ m_pConn->request_name(CC_DBUS_NAME);
+ }
+ catch(DBus::Error err)
+ {
+ throw std::string("Error while requesting dbus name - have you reloaded the dbus settings?");
+ }
}
CCommLayerServerDBus::~CCommLayerServerDBus()
{
- std::cout << "Cleaning up dbus" << std::endl;
delete m_pDispatcher;
}
vector_crash_infos_t CCommLayerServerDBus::GetCrashInfos(const std::string &pDBusSender)
{
- vector_crash_infos_t retval;
+ vector_crash_infos_t crashInfos;
unsigned long unix_uid = m_pConn->sender_unix_uid(pDBusSender.c_str());
- try
- {
- retval = m_pMW->GetCrashInfos(to_string(unix_uid));
- }
- catch(std::string err)
- {
- std::cerr << err << std::endl;
- }
- Notify("Sent crash info");
- return retval;
+ crashInfos = m_pObserver->GetCrashInfos(to_string(unix_uid));
+ return crashInfos;
}
map_crash_report_t CCommLayerServerDBus::CreateReport(const std::string &pUUID,const std::string &pDBusSender)
{
unsigned long unix_uid = m_pConn->sender_unix_uid(pDBusSender.c_str());
- //std::cerr << pUUID << ":" << unix_uid << std::endl;
map_crash_report_t crashReport;
- std::cerr << "Creating report" << std::endl;
- try
- {
- m_pMW->CreateCrashReport(pUUID,to_string(unix_uid), crashReport);
- //send out the message about completed analyze
- CDBusServer_adaptor::AnalyzeComplete(crashReport);
- }
- catch(std::string err)
- {
- CDBusServer_adaptor::Error(err);
- std::cerr << err << std::endl;
- }
+ crashReport = m_pObserver->CreateReport(pUUID, to_string(unix_uid));
return crashReport;
}
bool CCommLayerServerDBus::Report(map_crash_report_t pReport)
{
- //#define FIELD(X) crashReport.m_s##X = pReport[#X];
- //crashReport.m_sUUID = pReport["UUID"];
- //ALL_CRASH_REPORT_FIELDS;
- //#undef FIELD
- //for (dbus_map_report_info_t::iterator it = pReport.begin(); it!=pReport.end(); ++it) {
- // std::cerr << it->second << std::endl;
- //}
- try
- {
- m_pMW->Report(pReport);
- }
- catch(std::string err)
- {
- std::cerr << err << std::endl;
- return false;
- }
+ m_pObserver->Report(pReport);
return true;
}
bool CCommLayerServerDBus::DeleteDebugDump(const std::string& pUUID, const std::string& pDBusSender)
{
unsigned long unix_uid = m_pConn->sender_unix_uid(pDBusSender.c_str());
- try
- {
- //std::cerr << "DeleteDebugDump(" << pUUID << "," << unix_uid << ")" << std::endl;
- m_pMW->DeleteCrashInfo(pUUID,to_string(unix_uid), true);
- }
- catch(std::string err)
- {
- std::cerr << err << std::endl;
- return false;
- }
+ m_pObserver->DeleteDebugDump(pUUID,to_string(unix_uid));
return true;
}
diff --git a/lib/CommLayer/CommLayerServerDBus.h b/lib/CommLayer/CommLayerServerDBus.h
index 01314af..b5d3180 100644
--- a/lib/CommLayer/CommLayerServerDBus.h
+++ b/lib/CommLayer/CommLayerServerDBus.h
@@ -16,14 +16,14 @@ class CCommLayerServerDBus
DBus::Glib::BusDispatcher *m_pDispatcher;
static DBus::Connection *init_dbus(CCommLayerServerDBus *self);
public:
- CCommLayerServerDBus(CMiddleWare *m_pMW);
+ CCommLayerServerDBus();
virtual ~CCommLayerServerDBus();
-
+
virtual vector_crash_infos_t GetCrashInfos(const std::string &pDBusSender);
virtual map_crash_report_t CreateReport(const std::string &pUUID,const std::string &pDBusSender);
virtual bool Report(map_crash_report_t pReport);
virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pDBusSender);
-
+
void Crash(const std::string& arg1);
void AnalyzeComplete(map_crash_report_t arg1);
void Error(const std::string& arg1);
diff --git a/lib/CommLayer/CommLayerServerSocket.cpp b/lib/CommLayer/CommLayerServerSocket.cpp
index c172c86..b1ae434 100644
--- a/lib/CommLayer/CommLayerServerSocket.cpp
+++ b/lib/CommLayer/CommLayerServerSocket.cpp
@@ -2,8 +2,8 @@
#include <iostream>
-CCommLayerServerSocket::CCommLayerServerSocket(CMiddleWare *pMW)
-: CCommLayerServer(pMW)
+CCommLayerServerSocket::CCommLayerServerSocket()
+: CCommLayerServer()
{
std::cout << "CCommLayerServerSocket init" << std::endl;
}
diff --git a/lib/CommLayer/CommLayerServerSocket.h b/lib/CommLayer/CommLayerServerSocket.h
index 75d5852..d5604f1 100644
--- a/lib/CommLayer/CommLayerServerSocket.h
+++ b/lib/CommLayer/CommLayerServerSocket.h
@@ -5,6 +5,6 @@ class CCommLayerServerSocket
{
private:
public:
- CCommLayerServerSocket(CMiddleWare *pMW);
+ CCommLayerServerSocket();
~CCommLayerServerSocket();
};
diff --git a/lib/CommLayer/Makefile.am b/lib/CommLayer/Makefile.am
index 2c9d23e..d17cdc8 100644
--- a/lib/CommLayer/Makefile.am
+++ b/lib/CommLayer/Makefile.am
@@ -2,7 +2,8 @@ lib_LTLIBRARIES = libABRTCommLayer.la
libABRTCommLayer_la_SOURCES = CommLayerServer.h CommLayerServer.cpp \
CommLayerServerSocket.h CommLayerServerSocket.cpp \
CommLayerServerDBus.h CommLayerServerDBus.cpp \
- DBusServerProxy.h Observer.h DBusCommon.h
+ DBusServerProxy.h Observer.h DBusCommon.h \
+ CommLayerInner.h CommLayerInner.cpp
libABRTCommLayer_la_LIBADD = ../../lib/MiddleWare/libABRTMiddleWare.la $(DL_LIBS) $(DBUSCPP_LIBS)
libABRTCommLayer_la_LDFLAGS = -version-info 0:1:0
diff --git a/lib/CommLayer/Observer.h b/lib/CommLayer/Observer.h
index 94cccc0..6f276d7 100644
--- a/lib/CommLayer/Observer.h
+++ b/lib/CommLayer/Observer.h
@@ -1,6 +1,20 @@
+#ifndef OBSERVER_H_
+#define OBSERVER_H_
+
+#include "CrashTypes.h"
+
class CObserver {
public:
//CObserver();
virtual ~CObserver() {}
- virtual void Update(const std::string& pMessage) = 0;
+ virtual void StatusUpdate(const std::string& pMessage) = 0;
+ virtual void Debug(const std::string& pMessage) = 0;
+ virtual void Warning(const std::string& pMessage) = 0;
+/* this should be implemented in daemon */
+ virtual vector_crash_infos_t GetCrashInfos(const std::string &pDBusSender) = 0;
+ virtual map_crash_report_t CreateReport(const std::string &pUUID,const std::string &pDBusSender) = 0;
+ virtual bool Report(map_crash_report_t pReport) = 0;
+ virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pDBusSender) = 0;
};
+
+#endif /* OBSERVER_H_ */
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index 48d18db..2884e7c 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -30,6 +30,7 @@
#include <sstream>
#include <dirent.h>
#include <cstring>
+#include "CommLayer.h"
/* just a helper function
template< class T >
@@ -42,6 +43,14 @@ to_string( T x )
}
*/
+CCommLayerInner* pCommLayerInner;
+CCommLayerInner* get_commlayer()
+{
+ std::cerr << "get_commlayer" << std::endl;
+ return pCommLayerInner;
+}
+
+
gboolean CCrashWatcher::handle_event_cb(GIOChannel *gio, GIOCondition condition, gpointer daemon){
GIOError err;
//char *buf = malloc(INOTIFY_BUFF_SIZE;
@@ -160,6 +169,22 @@ void CCrashWatcher::SetUpMW()
}
}
+void CCrashWatcher::StatusUpdate(const std::string& pMessage)
+{
+ std::cout << "UPDATE: " << pMessage << std::endl;
+}
+
+void CCrashWatcher::Warning(const std::string& pMessage)
+{
+ std::cout << "WW: " << pMessage << std::endl;
+}
+
+void CCrashWatcher::Debug(const std::string& pMessage)
+{
+ //some logic to add logging levels?
+ std::cout << "DEBUG: " << pMessage << std::endl;
+}
+
double CCrashWatcher::GetDirSize(const std::string &pPath)
{
double size = 0;
@@ -194,21 +219,24 @@ CCrashWatcher::CCrashWatcher(const std::string& pPath)
{
int watch = 0;
m_sTarget = pPath;
- // middleware object
+// create inner commlayer
+pCommLayerInner = new CCommLayerInner(this);
+//middleware object
m_pSettings = new CSettings();
m_pSettings->LoadSettings(std::string(CONF_DIR) + "/abrt.conf");
+ m_pMainloop = g_main_loop_new(NULL,FALSE);
m_pMW = new CMiddleWare(PLUGINS_CONF_DIR,PLUGINS_LIB_DIR);
SetUpMW();
FindNewDumps(pPath);
- m_pMainloop = g_main_loop_new(NULL,FALSE);
+//first init commlayer
#ifdef HAVE_DBUS
- m_pCommLayer = new CCommLayerServerDBus(m_pMW);
+ m_pCommLayer = new CCommLayerServerDBus();
#elif HAVE_SOCKET
- m_pCommLayer = new CCommLayerServerSocket(m_pMW);
+ m_pCommLayer = new CCommLayerServerSocket();
#endif
- m_pCommLayer = new CCommLayerServerDBus(m_pMW);
+ m_pCommLayer = new CCommLayerServerDBus();
m_pCommLayer->Attach(this);
-
+
if((m_nFd = inotify_init()) == -1){
throw std::string("Init Failed");
//std::cerr << "Init Failed" << std::endl;
@@ -266,7 +294,7 @@ void CCrashWatcher::FindNewDumps(const std::string& pPath)
std::cerr << "Saving debugdeump: " << *itt << std::endl;
try
{
- if(m_pMW->SaveDebugDump(*itt, crashinfo))
+ if(m_pMW->SaveDebugDump(*itt, crashinfo) == 0)
{
std::cerr << "Saved new entry: " << *itt << std::endl;
m_pMW->Report(*itt);
@@ -360,3 +388,69 @@ void CCrashWatcher::Run()
GStartWatch();
}
+vector_crash_infos_t CCrashWatcher::GetCrashInfos(const std::string &pUID)
+{
+ vector_crash_infos_t retval;
+ std::cerr << "CCommLayerServerDBus::GetCrashInfos" << std::endl;
+ try
+ {
+ retval = m_pMW->GetCrashInfos(pUID);
+ }
+ catch(std::string err)
+ {
+ std::cerr << err << std::endl;
+ }
+ //Notify("Sent crash info");
+ return retval;
+}
+
+map_crash_report_t CCrashWatcher::CreateReport(const std::string &pUUID,const std::string &pUID)
+{
+ map_crash_report_t crashReport;
+ std::cerr << "Creating report" << std::endl;
+ try
+ {
+ m_pMW->CreateCrashReport(pUUID,pUID,crashReport);
+ m_pCommLayer->AnalyzeComplete(crashReport);
+ }
+ catch(std::string err)
+ {
+ m_pCommLayer->Error(err);
+ }
+ return crashReport;
+}
+
+bool CCrashWatcher::Report(map_crash_report_t pReport)
+{
+ //#define FIELD(X) crashReport.m_s##X = pReport[#X];
+ //crashReport.m_sUUID = pReport["UUID"];
+ //ALL_CRASH_REPORT_FIELDS;
+ //#undef FIELD
+ //for (dbus_map_report_info_t::iterator it = pReport.begin(); it!=pReport.end(); ++it) {
+ // std::cerr << it->second << std::endl;
+ //}
+ try
+ {
+ m_pMW->Report(pReport);
+ }
+ catch(std::string err)
+ {
+ std::cerr << err << std::endl;
+ return false;
+ }
+ return true;
+}
+
+bool CCrashWatcher::DeleteDebugDump(const std::string& pUUID, const std::string& pUID)
+{
+ try
+ {
+ m_pMW->DeleteCrashInfo(pUUID,pUID, true);
+ }
+ catch(std::string err)
+ {
+ std::cerr << err << std::endl;
+ return false;
+ }
+ return true;
+}
diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h
index a71e370..bdad266 100644
--- a/src/Daemon/CrashWatcher.h
+++ b/src/Daemon/CrashWatcher.h
@@ -28,7 +28,9 @@
//#include "DBusServerProxy.h"
#include "MiddleWare.h"
#include "Settings.h"
+#include "CommLayerInner.h"
+//FIXME remove when it gets to autoconf
#include "CommLayerServerDBus.h"
#ifdef HAVE_DBUS
#include "CommLayerServerDBus.h"
@@ -76,16 +78,15 @@ class CCrashWatcher
/* methods exported on dbus */
public:
- /*
- vector_crash_infos_t GetCrashInfos(const std::string &pUID);
- dbus_vector_map_crash_infos_t GetCrashInfosMap(const std::string &pDBusSender);
- dbus_map_report_info_t CreateReport(const std::string &pUUID,const std::string &pDBusSender);
- bool Report(dbus_map_report_info_t pReport);
- bool DeleteDebugDump(const std::string& pUUID, const std::string& pDBusSender);
- */
+ virtual vector_crash_infos_t GetCrashInfos(const std::string &pUID);
+ virtual map_crash_report_t CreateReport(const std::string &pUUID,const std::string &pUID);
+ virtual bool Report(map_crash_report_t pReport);
+ virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pUID);
public:
/* Observer methods */
- void Update(const std::string&) {}
+ void StatusUpdate(const std::string& pMessage);
+ void Debug(const std::string& pMessage);
+ void Warning(const std::string& pMessage);
};
#endif /*CRASHWATCHER_H_*/
diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am
index 8c05723..38c73a1 100644
--- a/src/Daemon/Makefile.am
+++ b/src/Daemon/Makefile.am
@@ -1,14 +1,14 @@
sbin_PROGRAMS = abrt
abrt_SOURCES = CrashWatcher.cpp CrashWatcher.h Daemon.cpp DBusServerProxy.h \
DBusCommon.h Settings.h Settings.cpp
-abrt_CPPFLAGS = -Wall -Werror -I../../lib/MiddleWare -I../../lib/CommLayer\
+abrt_CPPFLAGS = -Wall -Werror -rdynamic -I../../lib/MiddleWare -I../../lib/CommLayer\
-I../../lib/DBus \
-DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" $(GLIB_CFLAGS) $(DBUSCPP_CFLAGS) \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
-DCONF_DIR=\"$(CONF_DIR)\"
abrt_LDADD = ../../lib/MiddleWare/libABRTMiddleWare.la ../../lib/CommLayer/libABRTCommLayer.la $(DL_LIBS) $(DBUSCPP_LIBS) $(RPM_LIBS)
-
+abrt_LDFLAGS = -Wl,--dynamic-list,exported-symbols
dbusabrtconfdir = ${sysconfdir}/dbus-1/system.d/
dist_dbusabrtconf_DATA = dbus-abrt.conf
diff --git a/src/Daemon/exported-symbols b/src/Daemon/exported-symbols
new file mode 100644
index 0000000..511b598
--- /dev/null
+++ b/src/Daemon/exported-symbols
@@ -0,0 +1,3 @@
+{
+ get_commlayer;
+};