summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZdenek Prikryl <zprikryl@redhat.com>2009-09-08 18:34:03 +0200
committerZdenek Prikryl <zprikryl@redhat.com>2009-09-08 18:34:03 +0200
commite6457a64d5e096ff13106d246a30a82f342e0a02 (patch)
tree78485cb5cdd80f2ae6e4c888b1851ebebf272549 /src
parentd6082920ffc97274faf1a742dca074aeb14c1137 (diff)
parent38cd85491378153a46ea57e4001b6bf1e71ce97d (diff)
downloadabrt-e6457a64d5e096ff13106d246a30a82f342e0a02.tar.gz
abrt-e6457a64d5e096ff13106d246a30a82f342e0a02.tar.xz
abrt-e6457a64d5e096ff13106d246a30a82f342e0a02.zip
Merge branch 'master' of git://git.fedorahosted.org/abrt
Diffstat (limited to 'src')
-rw-r--r--src/Daemon/CommLayerServer.h1
-rw-r--r--src/Daemon/CommLayerServerDBus.cpp10
-rw-r--r--src/Daemon/CommLayerServerDBus.h1
-rw-r--r--src/Daemon/CommLayerServerSocket.cpp5
-rw-r--r--src/Daemon/CommLayerServerSocket.h2
-rw-r--r--src/Daemon/CrashWatcher.cpp2
-rw-r--r--src/Daemon/Daemon.cpp6
-rw-r--r--src/Daemon/Makefile.am7
-rw-r--r--src/Daemon/MiddleWare.cpp2
-rw-r--r--src/Daemon/Polkit.cpp2
-rw-r--r--src/Daemon/Polkit.h2
11 files changed, 11 insertions, 29 deletions
diff --git a/src/Daemon/CommLayerServer.h b/src/Daemon/CommLayerServer.h
index 0b1027a..e87c5c4 100644
--- a/src/Daemon/CommLayerServer.h
+++ b/src/Daemon/CommLayerServer.h
@@ -17,7 +17,6 @@ class CCommLayerServer {
virtual void JobDone(const char* pDest, const char* pUUID) = 0;
virtual void JobStarted(const char* pDest) {};
- virtual void Error(const std::string& pMessage, const char* peer) {}
virtual void Update(const std::string& pMessage, const char* peer, uint64_t pJobID) {};
virtual void Warning(const std::string& pMessage, const char* peer, uint64_t pJobID) {};
};
diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp
index c6908f5..eb1d133 100644
--- a/src/Daemon/CommLayerServerDBus.cpp
+++ b/src/Daemon/CommLayerServerDBus.cpp
@@ -393,16 +393,6 @@ void CCommLayerServerDBus::JobDone(const char* peer, const char* pUUID)
send_flush_and_unref(msg);
}
-void CCommLayerServerDBus::Error(const std::string& pMessage, const char* peer)
-{
- DBusMessage* msg = new_signal_msg("Error", peer);
- const char* c_message = pMessage.c_str();
- dbus_message_append_args(msg,
- DBUS_TYPE_STRING, &c_message,
- DBUS_TYPE_INVALID);
- send_flush_and_unref(msg);
-}
-
void CCommLayerServerDBus::Update(const std::string& pMessage, const char* peer, uint64_t job_id)
{
DBusMessage* msg = new_signal_msg("Update", peer);
diff --git a/src/Daemon/CommLayerServerDBus.h b/src/Daemon/CommLayerServerDBus.h
index 3a8822d..e1185c5 100644
--- a/src/Daemon/CommLayerServerDBus.h
+++ b/src/Daemon/CommLayerServerDBus.h
@@ -15,7 +15,6 @@ class CCommLayerServerDBus
virtual void JobStarted(const char* pDest);
virtual void JobDone(const char* pDest, const char* pUUID);
- virtual void Error(const std::string& pMessage, const char* peer);
virtual void Update(const std::string& pMessage, const char* peer, uint64_t pJobID);
virtual void Warning(const std::string& pMessage, const char* peer, uint64_t pJobID);
};
diff --git a/src/Daemon/CommLayerServerSocket.cpp b/src/Daemon/CommLayerServerSocket.cpp
index 8f1fd4f..b643aaa 100644
--- a/src/Daemon/CommLayerServerSocket.cpp
+++ b/src/Daemon/CommLayerServerSocket.cpp
@@ -245,8 +245,3 @@ void CCommLayerServerSocket::Crash(const std::string& arg1)
{
//Send("(CRASH)New Crash Detected: " + arg1);
}
-
-void CCommLayerServerSocket::Error(const std::string& arg1, const char* peer)
-{
- //Send("(ERROR)Error: " + arg1);
-}
diff --git a/src/Daemon/CommLayerServerSocket.h b/src/Daemon/CommLayerServerSocket.h
index 0ee4701..f598841 100644
--- a/src/Daemon/CommLayerServerSocket.h
+++ b/src/Daemon/CommLayerServerSocket.h
@@ -32,6 +32,4 @@ class CCommLayerServerSocket : public CCommLayerServer
virtual void Crash(const std::string& arg1);
virtual void JobStarted(const char* pDest) {};
-
- virtual void Error(const std::string& arg1, const char* peer);
};
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index 6c4d654..826dc9e 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -168,7 +168,7 @@ static void* create_report(void* arg)
{
if (e.type() == EXCEP_FATAL)
{
- set_client_name(NULL);
+ set_client_name(NULL);
/* free strduped strings */
free(thread_data->UUID);
free(thread_data->UID);
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp
index a7c9737..28a6c8a 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -75,12 +75,12 @@
* Sent as unicast to the client which did CreateReport.
* - JobDone(client_dbus_ID,UUID) - see CreateReport above.
* Sent as unicast to the client which did CreateReport.
- * - Error(msg)
- * - Warning(msg[,job_id])
+ * - Warning(msg,job_id)
* - Update(msg,job_id)
+ * Both are sent as unicast to last client set by set_client_name(name).
+ * If set_client_name(NULL) was done, they are not sent.
*
* TODO:
- * - Error/Warning/Update dbus signals must be unicast too
* - API does not really need JobStarted dbus signal at all, and JobDone signal
* does not need to pass any parameters - out clients never sent multiple
* CreateReport's.
diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am
index 934016a..17823d6 100644
--- a/src/Daemon/Makefile.am
+++ b/src/Daemon/Makefile.am
@@ -13,7 +13,8 @@ abrtd_SOURCES = \
CommLayerServerSocket.h CommLayerServerSocket.cpp \
CommLayerServerDBus.h CommLayerServerDBus.cpp \
Daemon.cpp Daemon.h \
- Settings.h Settings.cpp
+ Settings.h Settings.cpp \
+ Polkit.h Polkit.cpp
abrtd_CPPFLAGS = \
-I$(srcdir)/../../inc \
-I$(srcdir)/../../lib/MiddleWare \
@@ -25,11 +26,11 @@ abrtd_CPPFLAGS = \
-DCONF_DIR=\"$(CONF_DIR)\" \
-DVAR_RUN=\"$(VAR_RUN)\" \
$(GLIB_CFLAGS) $(DBUS_CFLAGS) \
- $(ENABLE_SOCKET_OR_DBUS)
+ $(ENABLE_SOCKET_OR_DBUS) $(POLKIT_CFLAGS)
abrtd_LDADD = \
../../lib/MiddleWare/libABRTMiddleWare.la \
../../lib/CommLayer/libABRTCommLayer.la \
- $(DL_LIBS) $(DBUS_LIBS) $(RPM_LIBS)
+ $(DL_LIBS) $(DBUS_LIBS) $(RPM_LIBS) $(POLKIT_LIBS)
dbusabrtconfdir = ${sysconfdir}/dbus-1/system.d/
dist_dbusabrtconf_DATA = dbus-abrt.conf
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp
index 4f499d6..8c880b8 100644
--- a/src/Daemon/MiddleWare.cpp
+++ b/src/Daemon/MiddleWare.cpp
@@ -173,7 +173,7 @@ mw_result_t CreateCrashReport(const std::string& pUUID,
const std::string& pUID,
map_crash_report_t& pCrashReport)
{
- VERB2 log("CreateCrashReport('%s','%',result)", pUUID.c_str(), pUID.c_str());
+ VERB2 log("CreateCrashReport('%s','%s',result)", pUUID.c_str(), pUID.c_str());
database_row_t row;
if (pUUID != "")
diff --git a/src/Daemon/Polkit.cpp b/src/Daemon/Polkit.cpp
index 8c8e388..722b788 100644
--- a/src/Daemon/Polkit.cpp
+++ b/src/Daemon/Polkit.cpp
@@ -24,7 +24,7 @@
#include "Polkit.h"
-PolkitResult polkit_check_authorization(char* dbus_name,char *action_id)
+PolkitResult polkit_check_authorization(const char* dbus_name,const char *action_id)
{
PolkitAuthority *authority;
PolkitSubject *subject;
diff --git a/src/Daemon/Polkit.h b/src/Daemon/Polkit.h
index bb03822..04aca64 100644
--- a/src/Daemon/Polkit.h
+++ b/src/Daemon/Polkit.h
@@ -34,6 +34,6 @@ POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE*/
PolkitChallenge = 0x03
} PolkitResult;
-PolkitResult polkit_check_authorization(char * dbus_name,char *action_id);
+PolkitResult polkit_check_authorization(const char * dbus_name,const char *action_id);
#endif