]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #804 from dvdhrm/proxy-directed2
authorDaniel Mack <github@zonque.org>
Fri, 31 Jul 2015 13:04:21 +0000 (15:04 +0200)
committerDaniel Mack <github@zonque.org>
Fri, 31 Jul 2015 13:04:21 +0000 (15:04 +0200)
bus-proxy: make NameAcquired/Lost directed (v2)

1  2 
src/bus-proxyd/proxy.c

diff --combined src/bus-proxyd/proxy.c
index b3ec048d03a39bd9cf1a30b02ae862bc7f10c72f,425af658734ce6b39bd178a8a22f45809cc166f5..df361ac400e101ff8695ba6de553fbb2eb989ab4
@@@ -261,18 -261,9 +261,18 @@@ int proxy_new(Proxy **out, int in_fd, i
  }
  
  Proxy *proxy_free(Proxy *p) {
 +        ProxyActivation *activation;
 +
          if (!p)
                  return NULL;
  
 +        while ((activation = p->activations)) {
 +                LIST_REMOVE(activations_by_proxy, p->activations, activation);
 +                sd_bus_message_unref(activation->request);
 +                sd_bus_slot_unref(activation->slot);
 +                free(activation);
 +        }
 +
          sd_bus_flush_close_unref(p->local_bus);
          sd_bus_flush_close_unref(p->destination_bus);
          set_free_free(p->owned_names);
@@@ -653,6 -644,10 +653,10 @@@ static int process_hello(Proxy *p, sd_b
          if (r < 0)
                  return log_error_errno(r, "Failed to append sender to NameAcquired message: %m");
  
+         r = sd_bus_message_set_destination(n, p->destination_bus->unique_name);
+         if (r < 0)
+                 return log_error_errno(r, "Failed to set destination for NameAcquired message: %m");
          r = bus_seal_synthetic_message(p->local_bus, n);
          if (r < 0)
                  return log_error_errno(r, "Failed to seal NameAcquired message: %m");