diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-01-20 17:19:18 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-01-20 17:19:18 +0100 |
commit | 21b7afb11405bc7ff24b43e6f441a40faff3a539 (patch) | |
tree | 0a88eeb83c876e9078fa67be52b9f0f835927963 /src | |
parent | 006e7e8dd2592c949c4f986473a8bfe975aa8264 (diff) | |
download | abrt-21b7afb11405bc7ff24b43e6f441a40faff3a539.tar.gz abrt-21b7afb11405bc7ff24b43e6f441a40faff3a539.tar.xz abrt-21b7afb11405bc7ff24b43e6f441a40faff3a539.zip |
disable SetSettings dbus call code
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/daemon/CommLayerServerDBus.cpp | 45 | ||||
-rw-r--r-- | src/daemon/Settings.cpp | 22 | ||||
-rw-r--r-- | src/daemon/Settings.h | 4 | ||||
-rw-r--r-- | src/gui/CCDBusBackend.py | 12 | ||||
-rw-r--r-- | src/gui/SettingsDialog.py | 5 |
5 files changed, 49 insertions, 39 deletions
diff --git a/src/daemon/CommLayerServerDBus.cpp b/src/daemon/CommLayerServerDBus.cpp index b9b7f20b..477e25d9 100644 --- a/src/daemon/CommLayerServerDBus.cpp +++ b/src/daemon/CommLayerServerDBus.cpp @@ -363,25 +363,25 @@ static int handle_GetSettings(DBusMessage* call, DBusMessage* reply) return 0; } -static int handle_SetSettings(DBusMessage* call, DBusMessage* reply) -{ - int r; - DBusMessageIter in_iter; - dbus_message_iter_init(call, &in_iter); - map_abrt_settings_t param1; - r = load_val(&in_iter, param1); - if (r != ABRT_DBUS_LAST_FIELD) - { - error_msg("dbus call %s: parameter type mismatch", __func__ + 7); - return -1; - } - - const char * sender = dbus_message_get_sender(call); - SetSettings(param1, sender); - - send_flush_and_unref(reply); - return 0; -} +//static int handle_SetSettings(DBusMessage* call, DBusMessage* reply) +//{ +// int r; +// DBusMessageIter in_iter; +// dbus_message_iter_init(call, &in_iter); +// map_abrt_settings_t param1; +// r = load_val(&in_iter, param1); +// if (r != ABRT_DBUS_LAST_FIELD) +// { +// error_msg("dbus call %s: parameter type mismatch", __func__ + 7); +// return -1; +// } +// +// const char * sender = dbus_message_get_sender(call); +// SetSettings(param1, sender); +// +// send_flush_and_unref(reply); +// return 0; +//} /* @@ -414,8 +414,11 @@ static DBusHandlerResult message_received(DBusConnection* conn, DBusMessage* msg r = handle_GetPluginSettings(msg, reply); else if (strcmp(member, "GetSettings") == 0) r = handle_GetSettings(msg, reply); - else if (strcmp(member, "SetSettings") == 0) - r = handle_SetSettings(msg, reply); +// looks unused to me. +// Ok to grep for SetSettings and delete after 2011-04-01. +// else if (strcmp(member, "SetSettings") == 0) +// r = handle_SetSettings(msg, reply); + // NB: C++ binding also handles "Introspect" method, which returns a string. // It was sending "dummy" introspection answer whick looks like this: // "<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n" diff --git a/src/daemon/Settings.cpp b/src/daemon/Settings.cpp index 5b5b18dd..b8f8751e 100644 --- a/src/daemon/Settings.cpp +++ b/src/daemon/Settings.cpp @@ -299,17 +299,17 @@ map_abrt_settings_t GetSettings() return ABRTSettings; } -/* dbus call to change some .conf file data */ -void SetSettings(const map_abrt_settings_t& pSettings, const char *dbus_sender) -{ - map_abrt_settings_t::const_iterator it = pSettings.find(SECTION_COMMON); - map_abrt_settings_t::const_iterator end = pSettings.end(); - if (it != end) - { - s_mapSectionCommon = it->second; - ParseCommon(); - } -} +///* dbus call to change some .conf file data */ +//void SetSettings(const map_abrt_settings_t& pSettings, const char *dbus_sender) +//{ +// map_abrt_settings_t::const_iterator it = pSettings.find(SECTION_COMMON); +// map_abrt_settings_t::const_iterator end = pSettings.end(); +// if (it != end) +// { +// s_mapSectionCommon = it->second; +// ParseCommon(); +// } +//} void settings_free() { diff --git a/src/daemon/Settings.h b/src/daemon/Settings.h index 05e7e907..6940732f 100644 --- a/src/daemon/Settings.h +++ b/src/daemon/Settings.h @@ -25,7 +25,9 @@ #ifdef __cplusplus typedef map_map_string_t map_abrt_settings_t; -void SetSettings(const map_abrt_settings_t& pSettings, const char *dbus_sender); +// looks unused to me. +// Ok to grep for SetSettings and delete after 2011-04-01. +// void SetSettings(const map_abrt_settings_t& pSettings, const char *dbus_sender); map_abrt_settings_t GetSettings(); extern "C" { diff --git a/src/gui/CCDBusBackend.py b/src/gui/CCDBusBackend.py index 3fa95eb9..6d48d014 100644 --- a/src/gui/CCDBusBackend.py +++ b/src/gui/CCDBusBackend.py @@ -211,11 +211,13 @@ class DBusManager(gobject.GObject): def getSettings(self): return self.daemon().GetSettings() - def setSettings(self, settings): - # FIXME: STUB!!!! - log1("setSettings stub") - retval = self.daemon().SetSettings(self.daemon().GetSettings()) - print ">>>", retval + ### looks unused to me. + ### Ok to grep for setSettings and delete after 2011-04-01. + ### def setSettings(self, settings): + ### # FIXME: STUB!!!! + ### log1("setSettings stub") + ### retval = self.daemon().SetSettings(self.daemon().GetSettings()) + ### print ">>>", retval def __del__(self): log1("CCDBusBackend is about to be deleted") diff --git a/src/gui/SettingsDialog.py b/src/gui/SettingsDialog.py index e6d30e99..f70f81ec 100644 --- a/src/gui/SettingsDialog.py +++ b/src/gui/SettingsDialog.py @@ -237,7 +237,10 @@ class SettingsDialog: self.add_AnalyzerAction() def dehydrate(self): - self.ccdaemon.setSettings(self.settings) + pass + ### looks unused to me. + ### Ok to grep for setSettings and delete after 2011-04-01. + ### self.ccdaemon.setSettings(self.settings) def show(self): self.window.show() |