X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fdbus-client-track.c;h=07dfea49e63d11e517659ed99c46ccdceddcff11;hb=d14ab08b29d5b0b3ead6e63ac8be472f273011f9;hp=4a5bdef04055b41c29716946ed177458927d78ed;hpb=ebcf1f97de4f6b1580ae55eb56b1a3939fe6b602;p=elogind.git diff --git a/src/core/dbus-client-track.c b/src/core/dbus-client-track.c index 4a5bdef04..07dfea49e 100644 --- a/src/core/dbus-client-track.c +++ b/src/core/dbus-client-track.c @@ -22,10 +22,10 @@ #include "bus-util.h" #include "dbus-client-track.h" -static unsigned tracked_client_hash(const void *a) { +static unsigned long tracked_client_hash(const void *a, const uint8_t hash_key[HASH_KEY_SIZE]) { const BusTrackedClient *x = a; - return string_hash_func(x->name) ^ PTR_TO_UINT(x->bus); + return string_hash_func(x->name, hash_key) ^ trivial_hash_func(x->bus, hash_key); } static int tracked_client_compare(const void *a, const void *b) { @@ -202,9 +202,9 @@ void bus_client_track_serialize(Manager *m, FILE *f, Set *s) { SET_FOREACH(c, s, i) { if (c->bus == m->api_bus) - fprintf(f, "subscribed=%s", isempty(c->name) ? "*" : c->name); + fprintf(f, "subscribed=%s\n", isempty(c->name) ? "*" : c->name); else - fprintf(f, "subscribed=%p %s", c->bus, isempty(c->name) ? "*" : c->name); + fprintf(f, "subscribed=%p %s\n", c->bus, isempty(c->name) ? "*" : c->name); } }