diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-12-08 14:51:47 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-12-08 14:51:47 +0100 |
commit | 816f3e001271ed8ab7fdadb6d90aeb2c61362dac (patch) | |
tree | a7e453859a80fb47c7c74cb37791e35ad50f1d97 /src/daemon/CommLayerServerDBus.cpp | |
parent | 3a9554929de070297a0e816eb2839291335a9403 (diff) | |
download | abrt-816f3e001271ed8ab7fdadb6d90aeb2c61362dac.tar.gz abrt-816f3e001271ed8ab7fdadb6d90aeb2c61362dac.tar.xz abrt-816f3e001271ed8ab7fdadb6d90aeb2c61362dac.zip |
removal of C++isms from libabrt, part 1
This patch converts libabrt usage of C++ map<string, string>
to a glib-based container, GHashTable.
It is typedef-ed to map_string_h.
We can't typedef it to map_string_t, since other parts of ABRT
(daemon, cli) still use that name for C++ container.
Also, exceptions are removed everywhere.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/daemon/CommLayerServerDBus.cpp')
-rw-r--r-- | src/daemon/CommLayerServerDBus.cpp | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/daemon/CommLayerServerDBus.cpp b/src/daemon/CommLayerServerDBus.cpp index 14f132b3..b9b7f20b 100644 --- a/src/daemon/CommLayerServerDBus.cpp +++ b/src/daemon/CommLayerServerDBus.cpp @@ -19,7 +19,6 @@ #include <dbus/dbus.h> #include "abrtlib.h" #include "abrt_dbus.h" -#include "abrt_exception.h" #include "comm_layer_inner.h" #include "dbus_common.h" #include "MiddleWare.h" @@ -275,20 +274,7 @@ static int handle_Report(DBusMessage* call, DBusMessage* reply) } unix_uid = get_remote_uid(call); - try - { - argout1 = Report(crash_data, events, user_conf_data, unix_uid); - } - catch (CABRTException &e) - { - dbus_message_unref(reply); - reply = dbus_message_new_error(call, DBUS_ERROR_FAILED, e.what()); - if (!reply) - die_out_of_memory(); - send_flush_and_unref(reply); - r = 0; - goto ret; - } + argout1 = Report(crash_data, events, user_conf_data, unix_uid); DBusMessageIter out_iter; dbus_message_iter_init_append(reply, &out_iter); @@ -353,12 +339,13 @@ static int handle_GetPluginSettings(DBusMessage* call, DBusMessage* reply) //long unix_uid = get_remote_uid(call); //VERB1 log("got %s('%s') call from uid %ld", "GetPluginSettings", PluginName, unix_uid); - map_plugin_settings_t plugin_settings; - GetPluginSettings(PluginName, plugin_settings); + map_string_h *plugin_settings = GetPluginSettings(PluginName); DBusMessageIter out_iter; dbus_message_iter_init_append(reply, &out_iter); - store_val(&out_iter, plugin_settings); + store_map_string(&out_iter, plugin_settings); + + free_map_string(plugin_settings); send_flush_and_unref(reply); return 0; |