summaryrefslogtreecommitdiffstats
path: root/src/Daemon
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-08-25 12:57:46 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-08-25 12:57:46 +0200
commit5bf3512df0529960ed4980251825b49a12eff894 (patch)
treede20619cee10aa47781f43a1be32e56af73cf99a /src/Daemon
parent47df431ad534b9319d95ef4dc79c2671baf0ee1b (diff)
downloadabrt-5bf3512df0529960ed4980251825b49a12eff894.tar.gz
abrt-5bf3512df0529960ed4980251825b49a12eff894.tar.xz
abrt-5bf3512df0529960ed4980251825b49a12eff894.zip
pass map_crash_report_t by const reference, not by value
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/Daemon')
-rw-r--r--src/Daemon/CommLayerServer.h8
-rw-r--r--src/Daemon/CommLayerServerDBus.cpp4
-rw-r--r--src/Daemon/CommLayerServerDBus.h4
-rw-r--r--src/Daemon/CommLayerServerSocket.cpp4
-rw-r--r--src/Daemon/CommLayerServerSocket.h8
-rw-r--r--src/Daemon/CrashWatcher.cpp2
-rw-r--r--src/Daemon/CrashWatcher.h2
-rw-r--r--src/Daemon/DBusServerProxy.cpp11
-rw-r--r--src/Daemon/DBusServerProxy.h12
9 files changed, 29 insertions, 26 deletions
diff --git a/src/Daemon/CommLayerServer.h b/src/Daemon/CommLayerServer.h
index af79511a..38dbac9b 100644
--- a/src/Daemon/CommLayerServer.h
+++ b/src/Daemon/CommLayerServer.h
@@ -31,15 +31,15 @@ class CCommLayerServer {
void Detach(CObserver *pObs);
void Notify(const std::string& pMessage);
- virtual vector_crash_infos_t GetCrashInfos(const std::string &pSender) = 0;
- virtual map_crash_report_t CreateReport(const std::string &pUUID,const std::string &pSender) = 0;
- virtual report_status_t Report(map_crash_report_t pReport,const std::string &pSender) = 0;
+ virtual vector_crash_infos_t GetCrashInfos(const std::string& pSender) = 0;
+ virtual map_crash_report_t CreateReport(const std::string &pUUID, const std::string& pSender) = 0;
+ virtual report_status_t Report(const map_crash_report_t& pReport, const std::string& pSender) = 0;
virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pSender) = 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 AnalyzeComplete(const map_crash_report_t& arg1) {}
virtual void Error(const std::string& arg1) {}
virtual void Update(const std::string& pDest, const std::string& pMessage) {};
virtual void Warning(const std::string& pDest, const std::string& pMessage) {};
diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp
index f0a9149b..48087396 100644
--- a/src/Daemon/CommLayerServerDBus.cpp
+++ b/src/Daemon/CommLayerServerDBus.cpp
@@ -64,7 +64,7 @@ uint64_t CCommLayerServerDBus::CreateReport_t(const std::string &pUUID,const std
return job_id;
}
-report_status_t CCommLayerServerDBus::Report(map_crash_report_t pReport,const std::string &pSender)
+report_status_t CCommLayerServerDBus::Report(const map_crash_report_t& pReport, const std::string &pSender)
{
report_status_t rs;
unsigned long unix_uid = m_pConn->sender_unix_uid(pSender.c_str());
@@ -92,7 +92,7 @@ void CCommLayerServerDBus::Crash(const std::string& arg)
CDBusServer_adaptor::Crash(arg);
}
-void CCommLayerServerDBus::AnalyzeComplete(map_crash_report_t arg1)
+void CCommLayerServerDBus::AnalyzeComplete(const map_crash_report_t& arg1)
{
CDBusServer_adaptor::AnalyzeComplete(arg1);
}
diff --git a/src/Daemon/CommLayerServerDBus.h b/src/Daemon/CommLayerServerDBus.h
index ad245061..c335b6f2 100644
--- a/src/Daemon/CommLayerServerDBus.h
+++ b/src/Daemon/CommLayerServerDBus.h
@@ -26,7 +26,7 @@ class CCommLayerServerDBus
return retval;
}
virtual uint64_t CreateReport_t(const std::string& pUUID, const std::string& pSender);
- virtual report_status_t Report(map_crash_report_t pReport,const std::string& pSender);
+ virtual report_status_t Report(const map_crash_report_t& pReport, const std::string& pSender);
virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pSender);
virtual map_crash_report_t GetJobResult(uint64_t pJobID, const std::string& pSender);
virtual vector_map_string_string_t GetPluginsInfo();
@@ -36,7 +36,7 @@ class CCommLayerServerDBus
void UnRegisterPlugin(const std::string& pName);
virtual void Crash(const std::string& arg1);
- virtual void AnalyzeComplete(map_crash_report_t arg1);
+ virtual void AnalyzeComplete(const map_crash_report_t& arg1);
virtual void Error(const std::string& arg1);
virtual void Update(const std::string& pDest, const std::string& pMessage);
virtual void JobDone(const std::string& pDest, uint64_t pJobID);
diff --git a/src/Daemon/CommLayerServerSocket.cpp b/src/Daemon/CommLayerServerSocket.cpp
index f5466d43..8347ad7a 100644
--- a/src/Daemon/CommLayerServerSocket.cpp
+++ b/src/Daemon/CommLayerServerSocket.cpp
@@ -219,7 +219,7 @@ map_crash_report_t CCommLayerServerSocket::CreateReport(const std::string &pUUID
return crashReport;
}
-report_status_t CCommLayerServerSocket::Report(map_crash_report_t pReport, const std::string& pSender)
+report_status_t CCommLayerServerSocket::Report(const map_crash_report_t& pReport, const std::string& pSender)
{
report_status_t rs;
rs = m_pObserver->Report(pReport, pSender);
@@ -237,7 +237,7 @@ void CCommLayerServerSocket::Crash(const std::string& arg1)
//Send("(CRASH)New Crash Detected: " + arg1);
}
-void CCommLayerServerSocket::AnalyzeComplete(map_crash_report_t arg1)
+void CCommLayerServerSocket::AnalyzeComplete(const map_crash_report_t& arg1)
{
//Send("(ANALYZE_COMPLETE)Analyze Complete.");
}
diff --git a/src/Daemon/CommLayerServerSocket.h b/src/Daemon/CommLayerServerSocket.h
index 2dc9a7ae..31496334 100644
--- a/src/Daemon/CommLayerServerSocket.h
+++ b/src/Daemon/CommLayerServerSocket.h
@@ -26,12 +26,12 @@ class CCommLayerServerSocket : public CCommLayerServer
CCommLayerServerSocket();
virtual ~CCommLayerServerSocket();
- virtual vector_crash_infos_t GetCrashInfos(const std::string &pSender);
- virtual map_crash_report_t CreateReport(const std::string &pUUID,const std::string &pSender);
- virtual report_status_t Report(map_crash_report_t pReport, const std::string& pSender);
+ virtual vector_crash_infos_t GetCrashInfos(const std::string& pSender);
+ virtual map_crash_report_t CreateReport(const std::string& pUUID, const std::string& pSender);
+ virtual report_status_t Report(const map_crash_report_t& pReport, const std::string& pSender);
virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pSender);
virtual void Crash(const std::string& arg1);
- virtual void AnalyzeComplete(map_crash_report_t arg1);
+ virtual void AnalyzeComplete(const map_crash_report_t& arg1);
virtual void Error(const std::string& arg1);
};
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index 89e9fe9a..5a6463a7 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -192,7 +192,7 @@ uint64_t CCrashWatcher::CreateReport_t(const std::string &pUUID,const std::strin
return 0;
}
-report_status_t CCrashWatcher::Report(map_crash_report_t pReport, const std::string& pUID)
+report_status_t CCrashWatcher::Report(const map_crash_report_t& pReport, const std::string& pUID)
{
//#define FIELD(X) crashReport.m_s##X = pReport[#X];
//crashReport.m_sUUID = pReport["UUID"];
diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h
index ae600abb..78cd706b 100644
--- a/src/Daemon/CrashWatcher.h
+++ b/src/Daemon/CrashWatcher.h
@@ -64,7 +64,7 @@ class CCrashWatcher
return retval;
}
uint64_t CreateReport_t(const std::string &pUUID,const std::string &pUID, const std::string &pSender);
- virtual report_status_t Report(map_crash_report_t pReport, const std::string &pUID);
+ virtual report_status_t Report(const map_crash_report_t& pReport, const std::string &pUID);
virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pUID);
virtual map_crash_report_t GetJobResult(uint64_t pJobID, const std::string& pSender);
/* plugins related */
diff --git a/src/Daemon/DBusServerProxy.cpp b/src/Daemon/DBusServerProxy.cpp
index 5730fd52..237a06a0 100644
--- a/src/Daemon/DBusServerProxy.cpp
+++ b/src/Daemon/DBusServerProxy.cpp
@@ -92,7 +92,7 @@ void CDBusServer_adaptor::Crash(const std::string& arg1)
}
/* Notify the clients that creating a report has finished */
-void CDBusServer_adaptor::AnalyzeComplete(map_crash_report_t arg1)
+void CDBusServer_adaptor::AnalyzeComplete(const map_crash_report_t& arg1)
{
::DBus::SignalMessage sig("AnalyzeComplete");
::DBus::MessageIter wi = sig.writer();
@@ -153,7 +153,8 @@ DBus::Message CDBusServer_adaptor::_CreateReport_stub(const DBus::CallMessage &c
{
DBus::MessageIter ri = call.reader();
- std::string argin1; ri >> argin1;
+ std::string argin1;
+ ri >> argin1;
uint64_t argout1 = CreateReport_t(argin1, call.sender());
if(sizeof (uint64_t) != 8) abort ();
//map_crash_report_t argout1 = CreateReport(argin1,call.sender());
@@ -167,7 +168,8 @@ DBus::Message CDBusServer_adaptor::_Report_stub(const DBus::CallMessage &call)
{
DBus::MessageIter ri = call.reader();
- map_crash_report_t argin1; ri >> argin1;
+ map_crash_report_t argin1;
+ ri >> argin1;
report_status_t argout1 = Report(argin1, call.sender());
DBus::ReturnMessage reply(call);
DBus::MessageIter wi = reply.writer();
@@ -179,7 +181,8 @@ DBus::Message CDBusServer_adaptor::_DeleteDebugDump_stub(const DBus::CallMessage
{
DBus::MessageIter ri = call.reader();
- std::string argin1; ri >> argin1;
+ std::string argin1;
+ ri >> argin1;
bool argout1 = DeleteDebugDump(argin1, call.sender());
DBus::ReturnMessage reply(call);
DBus::MessageIter wi = reply.writer();
diff --git a/src/Daemon/DBusServerProxy.h b/src/Daemon/DBusServerProxy.h
index 20538412..91d1b1f9 100644
--- a/src/Daemon/DBusServerProxy.h
+++ b/src/Daemon/DBusServerProxy.h
@@ -43,10 +43,10 @@ public:
* you will have to implement them in your ObjectAdaptor
*/
- 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 uint64_t CreateReport_t(const std::string &pUUID, const std::string &pDBusSender) = 0;
- virtual report_status_t Report(map_crash_report_t pReport, 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 uint64_t CreateReport_t(const std::string& pUUID, const std::string& pDBusSender) = 0;
+ virtual report_status_t Report(const map_crash_report_t& pReport, const std::string& pDBusSender) = 0;
virtual bool DeleteDebugDump(const std::string& pUUID, const std::string& pDBusSender) = 0;
virtual map_crash_report_t GetJobResult(uint64_t pJobID, const std::string& pDBusSender) = 0;
virtual vector_map_string_string_t GetPluginsInfo() = 0;
@@ -61,8 +61,8 @@ public:
/* Notify the clients (UI) about a new crash */
void Crash(const std::string& arg1);
/* Notify the clients that creating a report has finished */
- void AnalyzeComplete(map_crash_report_t arg1);
- void JobDone(const std::string &pDest, uint64_t job_id);
+ void AnalyzeComplete(const map_crash_report_t& arg1);
+ void JobDone(const std::string& pDest, uint64_t job_id);
void Error(const std::string& arg1);
void Update(const std::string pDest, const std::string& pMessage);
void Warning(const std::string& arg1);