X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flogin%2Flogind-session.c;h=dc4b3e1621f033a8561e2d76fe345c88905b4c3c;hp=a72b13ee0363c3826836706c36c4f4dd64439c00;hb=eff05270986a13e7de93ae16311f654d3f7c166f;hpb=c506027af881a9e4210845a7a8a6ec5910aa0f3b diff --git a/src/login/logind-session.c b/src/login/logind-session.c index a72b13ee0..dc4b3e162 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -40,10 +40,10 @@ #include "bus-error.h" #include "logind-session.h" -static unsigned devt_hash_func(const void *p) { +static unsigned long devt_hash_func(const void *p, const uint8_t hash_key[HASH_KEY_SIZE]) { uint64_t u = *(const dev_t*)p; - return uint64_hash_func(&u); + return uint64_hash_func(&u, hash_key); } static int devt_compare_func(const void *_a, const void *_b) { @@ -79,7 +79,7 @@ Session* session_new(Manager *m, const char *id) { return NULL; } - s->id = path_get_file_name(s->state_file); + s->id = basename(s->state_file); if (hashmap_put(m->sessions, s->id, s) < 0) { hashmap_free(s->devices); @@ -954,9 +954,6 @@ void session_add_to_gc_queue(Session *s) { SessionState session_get_state(Session *s) { assert(s); - if (s->closing) - return SESSION_CLOSING; - if (s->scope_job) return SESSION_OPENING;