From 62a20f5cda51e85b9e738ae39f26766abf15b5ccfbe45bde543125d4dc2eb705 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 13 Mar 2014 14:18:27 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=555 --- systemd-big-endian-reply-matching.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/systemd-big-endian-reply-matching.patch b/systemd-big-endian-reply-matching.patch index a9d0b971..8759f43f 100644 --- a/systemd-big-endian-reply-matching.patch +++ b/systemd-big-endian-reply-matching.patch @@ -27,10 +27,10 @@ Index: systemd-210/src/libsystemd/sd-bus/sd-bus.c + +static inline void bus_drop_reply_callback(sd_bus *bus, const struct reply_callback *c) +{ -+ struct reply_callback *cc; ++ struct reply_callback *cc; + -+ cc = bus_get_reply_callback(bus, c->cookie); -+ assert(cc == NULL || cc == c); ++ cc = bus_get_reply_callback(bus, c->cookie); ++ assert(cc == NULL || cc == c); +} + static int hello_callback(sd_bus *bus, sd_bus_message *reply, void *userdata, sd_bus_error *error) { @@ -41,7 +41,7 @@ Index: systemd-210/src/libsystemd/sd-bus/sd-bus.c c->timeout = calc_elapse(m->timeout); - r = hashmap_put(bus->reply_callbacks, &c->cookie, c); -+ r = bus_add_reply_callback(bus, c, c->cookie); ++ r = bus_add_reply_callback(bus, c, c->cookie); if (r < 0) { free(c); return r; @@ -59,7 +59,7 @@ Index: systemd-210/src/libsystemd/sd-bus/sd-bus.c assert_se(prioq_pop(bus->reply_callbacks_prioq) == c); - hashmap_remove(bus->reply_callbacks, &c->cookie); -+ bus_drop_reply_callback(bus, c->cookie); ++ bus_drop_reply_callback(bus, c); bus->current = m; bus->iteration_counter ++; @@ -68,8 +68,8 @@ Index: systemd-210/src/libsystemd/sd-bus/sd-bus.c return 0; - c = hashmap_remove(bus->reply_callbacks, &m->reply_cookie); -+ /* caveat emptor: reply_cookie is 32bit, but the hashmap lookup uses a 64bit -+ * cookie pointer - without type checking, */ ++ /* caveat emptor: reply_cookie is 32bit, but the hashmap lookup uses a 64bit ++ * cookie pointer - without type checking, */ + c = bus_get_reply_callback(bus, m->reply_cookie); if (!c) return 0; @@ -79,8 +79,8 @@ Index: systemd-210/src/libsystemd/sd-bus/sd-bus.c prioq_remove(bus->reply_callbacks_prioq, c, &c->prioq_idx); - hashmap_remove(bus->reply_callbacks, &c->cookie); -+ /* Remove callback from reply_callbacks hashmap */ -+ bus_drop_reply_callback(bus, c->cookie); ++ /* Remove callback from reply_callbacks hashmap */ ++ bus_drop_reply_callback(bus, c); bus->current = m; bus->iteration_counter++;