summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-01-14 02:13:26 +0100
committerLennart Poettering <lennart@poettering.net>2013-01-14 21:25:25 +0100
commitaca26b52200a4666c9f80a942150a90004130010 (patch)
tree4b4f21a3bbceae91f821686d63c6fa5c7bd41a1b
parent7b4da18c1717f811bae67ea3d39290495857c03e (diff)
systemctl: drop compat with really really old systemd versions
-rw-r--r--src/systemctl/systemctl.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 76c67f20c8..0bae67eb8c 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -1120,7 +1120,6 @@ static DBusHandlerResult wait_filter(DBusConnection *connection, DBusMessage *me
} else if (dbus_message_is_signal(message, "org.freedesktop.systemd1.Manager", "JobRemoved")) {
uint32_t id;
const char *path, *result, *unit;
- dbus_bool_t success = true;
if (dbus_message_get_args(message, &error,
DBUS_TYPE_UINT32, &id,
@@ -1128,10 +1127,8 @@ static DBusHandlerResult wait_filter(DBusConnection *connection, DBusMessage *me
DBUS_TYPE_STRING, &unit,
DBUS_TYPE_STRING, &result,
DBUS_TYPE_INVALID)) {
- char *p;
- p = set_remove(d->set, (char*) path);
- free(p);
+ free(set_remove(d->set, (char*) path));
if (!isempty(result))
d->result = strdup(result);
@@ -1148,40 +1145,16 @@ static DBusHandlerResult wait_filter(DBusConnection *connection, DBusMessage *me
DBUS_TYPE_OBJECT_PATH, &path,
DBUS_TYPE_STRING, &result,
DBUS_TYPE_INVALID)) {
- char *p;
-
/* Compatibility with older systemd versions <
* 183 during upgrades. This should be dropped
* one day. */
- p = set_remove(d->set, (char*) path);
- free(p);
+ free(set_remove(d->set, (char*) path));
if (*result)
d->result = strdup(result);
goto finish;
}
-
- dbus_error_free(&error);
- if (dbus_message_get_args(message, &error,
- DBUS_TYPE_UINT32, &id,
- DBUS_TYPE_OBJECT_PATH, &path,
- DBUS_TYPE_BOOLEAN, &success,
- DBUS_TYPE_INVALID)) {
- char *p;
-
- /* Compatibility with older systemd versions <
- * 19 during upgrades. This should be dropped
- * one day */
-
- p = set_remove(d->set, (char*) path);
- free(p);
-
- if (!success)
- d->result = strdup("failed");
-
- goto finish;
- }
#endif
log_error("Failed to parse message: %s", bus_error_message(&error));