diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-12-09 18:11:04 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-12-09 18:11:04 +0100 |
commit | 89295b6bec0ea4eae5af3b09bf0df74a51b60e94 (patch) | |
tree | cc5a9da09bd0a1307c44cbab93d3d23569293702 /src | |
parent | bed685672e74b57c47b4e1053b373784d6b41b0a (diff) | |
download | abrt-89295b6bec0ea4eae5af3b09bf0df74a51b60e94.tar.gz abrt-89295b6bec0ea4eae5af3b09bf0df74a51b60e94.tar.xz abrt-89295b6bec0ea4eae5af3b09bf0df74a51b60e94.zip |
convert Applet.cpp to C. Needed only one change: dbus' load_val -> load_charp
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/applet/Makefile.am | 2 | ||||
-rw-r--r-- | src/applet/applet.c (renamed from src/applet/Applet.cpp) | 26 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/applet/Makefile.am b/src/applet/Makefile.am index 294f0fed..cd4a643f 100644 --- a/src/applet/Makefile.am +++ b/src/applet/Makefile.am @@ -2,7 +2,7 @@ bin_PROGRAMS = abrt-applet #test-report abrt_applet_SOURCES = \ - Applet.cpp \ + applet.c \ applet_gtk.h applet_gtk.c abrt_applet_CPPFLAGS = \ -I$(srcdir)/../include/report -I$(srcdir)/../include \ diff --git a/src/applet/Applet.cpp b/src/applet/applet.c index 4ce497cf..37c5f386 100644 --- a/src/applet/Applet.cpp +++ b/src/applet/applet.c @@ -38,8 +38,8 @@ static void Crash(DBusMessage* signal) dbus_message_iter_init(signal, &in_iter); /* 1st param: package */ - const char* package_name; - r = load_val(&in_iter, package_name); + const char* package_name = NULL; + r = load_charp(&in_iter, &package_name); /* 2nd param: crash_id */ if (r != ABRT_DBUS_MORE_FIELDS) @@ -48,7 +48,7 @@ static void Crash(DBusMessage* signal) return; } const char* crash_id = NULL; - r = load_val(&in_iter, crash_id); + r = load_charp(&in_iter, &crash_id); /* 3rd param: dir */ //dir parameter is not used for now, use is planned in the future @@ -58,13 +58,13 @@ static void Crash(DBusMessage* signal) return; } const char* dir = NULL; - r = load_val(&in_iter, dir); + r = load_charp(&in_iter, &dir); /* Optional 4th param: uid */ const char* uid_str = NULL; if (r == ABRT_DBUS_MORE_FIELDS) { - r = load_val(&in_iter, uid_str); + r = load_charp(&in_iter, &uid_str); } if (r != ABRT_DBUS_LAST_FIELD) { @@ -118,8 +118,8 @@ static void QuotaExceed(DBusMessage* signal) int r; DBusMessageIter in_iter; dbus_message_iter_init(signal, &in_iter); - const char* str; - r = load_val(&in_iter, str); + const char* str = NULL; + r = load_charp(&in_iter, &str); if (r != ABRT_DBUS_LAST_FIELD) { error_msg("dbus signal %s: parameter type mismatch", __func__); @@ -137,8 +137,8 @@ static void NameOwnerChanged(DBusMessage* signal) int r; DBusMessageIter in_iter; dbus_message_iter_init(signal, &in_iter); - const char* name; - r = load_val(&in_iter, name); + const char* name = NULL; + r = load_charp(&in_iter, &name); if (r != ABRT_DBUS_MORE_FIELDS) { error_msg("dbus signal %s: parameter type mismatch", __func__); @@ -149,15 +149,15 @@ static void NameOwnerChanged(DBusMessage* signal) if (strcmp(name, "com.redhat.abrt") != 0) return; - const char* old_owner; - r = load_val(&in_iter, old_owner); + const char* old_owner = NULL; + r = load_charp(&in_iter, &old_owner); if (r != ABRT_DBUS_MORE_FIELDS) { error_msg("dbus signal %s: parameter type mismatch", __func__); return; } - const char* new_owner; - r = load_val(&in_iter, new_owner); + const char* new_owner = NULL; + r = load_charp(&in_iter, &new_owner); if (r != ABRT_DBUS_LAST_FIELD) { error_msg("dbus signal %s: parameter type mismatch", __func__); |