network: replace usage of sd_bus_call_method_async() to bus_call_method_async() (#24290)

This commit is contained in:
williamsumendap 2022-08-12 11:28:29 -07:00 committed by GitHub
parent 9d9bc6fc57
commit d277530616
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 8 deletions

View file

@ -4,6 +4,7 @@
#include <linux/if_arp.h>
#include "bus-error.h"
#include "bus-locator.h"
#include "dhcp-identifier.h"
#include "dhcp-internal.h"
#include "dhcp6-internal.h"
@ -187,12 +188,10 @@ int manager_request_product_uuid(Manager *m) {
m->product_uuid_requested = false;
r = sd_bus_call_method_async(
r = bus_call_method_async(
m->bus,
NULL,
"org.freedesktop.hostname1",
"/org/freedesktop/hostname1",
"org.freedesktop.hostname1",
bus_hostname,
"GetProductUUID",
get_product_uuid_handler,
m,

View file

@ -993,12 +993,10 @@ int manager_set_hostname(Manager *m, const char *hostname) {
return 0;
}
r = sd_bus_call_method_async(
r = bus_call_method_async(
m->bus,
NULL,
"org.freedesktop.hostname1",
"/org/freedesktop/hostname1",
"org.freedesktop.hostname1",
bus_hostname,
"SetHostname",
set_hostname_handler,
m,

View file

@ -63,6 +63,12 @@ const BusLocator* const bus_timedate = &(BusLocator){
.interface = "org.freedesktop.timedate1"
};
const BusLocator* const bus_hostname = &(BusLocator){
.destination = "org.freedesktop.hostname1",
.path = "/org/freedesktop/hostname1",
.interface = "org.freedesktop.hostname1"
};
/* Shorthand flavors of the sd-bus convenience helpers with destination,path,interface strings encapsulated
* within a single struct. */
int bus_call_method_async(

View file

@ -19,6 +19,7 @@ extern const BusLocator* const bus_portable_mgr;
extern const BusLocator* const bus_resolve_mgr;
extern const BusLocator* const bus_systemd_mgr;
extern const BusLocator* const bus_timedate;
extern const BusLocator* const bus_hostname;
/* Shorthand flavors of the sd-bus convenience helpers with destination,path,interface strings encapsulated
* within a single struct. */