chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
man: doc-sync - properly delete no longer existing stuff on remote server
[elogind.git]
/
src
/
core
/
dbus.c
diff --git
a/src/core/dbus.c
b/src/core/dbus.c
index fe73b0a4344038570a4f82664e3f75cb5493a1e6..434796456bb8a7c6e5112684261fe9c1f62d044b 100644
(file)
--- a/
src/core/dbus.c
+++ b/
src/core/dbus.c
@@
-1167,13
+1167,15
@@
static void shutdown_connection(Manager *m, DBusConnection *c) {
Job *j;
Iterator i;
Job *j;
Iterator i;
- HASHMAP_FOREACH(j, m->jobs, i)
- if (j->bus == c) {
- free(j->bus_client);
- j->bus_client = NULL;
-
- j->bus = NULL;
+ HASHMAP_FOREACH(j, m->jobs, i) {
+ JobBusClient *cl, *nextcl;
+ LIST_FOREACH_SAFE(client, cl, nextcl, j->bus_client_list) {
+ if (cl->bus == c) {
+ LIST_REMOVE(JobBusClient, client, j->bus_client_list, cl);
+ free(cl);
+ }
}
}
+ }
set_remove(m->bus_connections, c);
set_remove(m->bus_connections_for_dispatch, c);
set_remove(m->bus_connections, c);
set_remove(m->bus_connections_for_dispatch, c);