1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-28 07:21:32 +03:00

resolved: rename 'notification' → 'monitor'

We expose this externally already as "monitor", name it internally the
same way. (Which is nice since it mirrors busctl monitor)
This commit is contained in:
Lennart Poettering 2022-09-27 14:28:32 +02:00
parent baf3fdec27
commit 227e127943
4 changed files with 9 additions and 9 deletions

View File

@ -586,7 +586,7 @@ void dns_query_complete(DnsQuery *q, DnsTransactionState state) {
q->state = state;
if (q->question_utf8 && state == DNS_TRANSACTION_SUCCESS && set_size(q->manager->varlink_subscription) > 0)
(void) send_dns_notification(q->manager, q->answer, dns_question_first_name(q->question_utf8));
(void) manager_monitor_send(q->manager, q->answer, dns_question_first_name(q->question_utf8));
dns_query_stop(q);
if (q->complete)

View File

@ -1043,7 +1043,7 @@ static int manager_ipv6_send(
return sendmsg_loop(fd, &mh, 0);
}
int send_dns_notification(Manager *m, DnsAnswer *answer, const char *query_name) {
int manager_monitor_send(Manager *m, DnsAnswer *answer, const char *query_name) {
_cleanup_free_ char *normalized = NULL;
DnsResourceRecord *rr;
int ifindex, r;

View File

@ -148,7 +148,7 @@ struct Manager {
Hashmap *polkit_registry;
VarlinkServer *varlink_server;
VarlinkServer *varlink_notification_server;
VarlinkServer *varlink_monitor_server;
Set *varlink_subscription;
@ -168,7 +168,7 @@ int manager_start(Manager *m);
uint32_t manager_find_mtu(Manager *m);
int send_dns_notification(Manager *m, DnsAnswer *answer, const char *query_name);
int manager_monitor_send(Manager *m, DnsAnswer *answer, const char *query_name);
int manager_write(Manager *m, int fd, DnsPacket *p);
int manager_send(Manager *m, int fd, int ifindex, int family, const union in_addr_union *destination, uint16_t port, const union in_addr_union *source, DnsPacket *p);

View File

@ -556,13 +556,13 @@ static int vl_method_subscribe_dns_resolves(Varlink *link, JsonVariant *paramete
return 1;
}
static int varlink_notification_server_init(Manager *m) {
static int varlink_monitor_server_init(Manager *m) {
_cleanup_(varlink_server_unrefp) VarlinkServer *server = NULL;
int r;
assert(m);
if (!m->enable_varlink_notifications || m->varlink_notification_server)
if (!m->enable_varlink_notifications || m->varlink_monitor_server)
return 0;
r = varlink_server_new(&server, VARLINK_SERVER_ROOT_ONLY);
@ -590,7 +590,7 @@ static int varlink_notification_server_init(Manager *m) {
if (r < 0)
return log_error_errno(r, "Failed to attach varlink connection to event loop: %m");
m->varlink_notification_server = TAKE_PTR(server);
m->varlink_monitor_server = TAKE_PTR(server);
return 0;
}
@ -631,7 +631,7 @@ int manager_varlink_init(Manager *m) {
m->varlink_server = TAKE_PTR(s);
r = varlink_notification_server_init(m);
r = varlink_monitor_server_init(m);
if (r < 0)
return r;
@ -642,5 +642,5 @@ void manager_varlink_done(Manager *m) {
assert(m);
m->varlink_server = varlink_server_unref(m->varlink_server);
m->varlink_notification_server = varlink_server_unref(m->varlink_notification_server);
m->varlink_monitor_server = varlink_server_unref(m->varlink_monitor_server);
}