mirror of
https://github.com/systemd/systemd.git
synced 2024-12-21 13:34:21 +03:00
manager: s/deserialized_subscribed/subscribe_serialization
Now that this field may get populated at runtime, the deserialized name is misleading. Change the name to reflect its updated purpose.
This commit is contained in:
parent
1b58645207
commit
b2347d690a
@ -860,10 +860,10 @@ int bus_init_api(Manager *m) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to set up API bus: %m");
|
||||
|
||||
r = bus_track_coldplug(bus, &m->subscribed, /* recursive= */ false, m->deserialized_subscribed);
|
||||
r = bus_track_coldplug(bus, &m->subscribed, /* recursive= */ false, m->subscribe_serialization);
|
||||
if (r < 0)
|
||||
return r;
|
||||
m->deserialized_subscribed = strv_free(m->deserialized_subscribed);
|
||||
m->subscribe_serialization = strv_free(m->subscribe_serialization);
|
||||
m->api_bus = TAKE_PTR(bus);
|
||||
|
||||
return 0;
|
||||
@ -1015,7 +1015,7 @@ static void destroy_bus(Manager *m, sd_bus **bus) {
|
||||
r = bus_track_to_strv(m->subscribed, &subscribed);
|
||||
if (r < 0)
|
||||
log_error_errno(r, "Failed to serialize api subscribers: %m");
|
||||
r = strv_extend_strv_consume(&m->deserialized_subscribed, TAKE_PTR(subscribed), /* filter_duplicates = */ false);
|
||||
r = strv_extend_strv_consume(&m->subscribe_serialization, TAKE_PTR(subscribed), /* filter_duplicates = */ false);
|
||||
if (r < 0)
|
||||
log_error_errno(r, "Failed to record api subscribers: %m");
|
||||
|
||||
|
@ -493,7 +493,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
|
||||
(void) exec_shared_runtime_deserialize_one(m, val, fds);
|
||||
else if ((val = startswith(l, "subscribed="))) {
|
||||
|
||||
r = strv_extend(&m->deserialized_subscribed, val);
|
||||
r = strv_extend(&m->subscribe_serialization, val);
|
||||
if (r < 0)
|
||||
return r;
|
||||
} else if ((val = startswith(l, "varlink-server-socket-address="))) {
|
||||
|
@ -1804,7 +1804,7 @@ Manager* manager_free(Manager *m) {
|
||||
free(m->switch_root_init);
|
||||
|
||||
sd_bus_track_unref(m->subscribed);
|
||||
strv_free(m->deserialized_subscribed);
|
||||
strv_free(m->subscribe_serialization);
|
||||
|
||||
unit_defaults_done(&m->defaults);
|
||||
|
||||
@ -2142,10 +2142,10 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds, const char *roo
|
||||
manager_setup_bus(m);
|
||||
|
||||
/* Now that we are connected to all possible buses, let's deserialize who is tracking us. */
|
||||
r = bus_track_coldplug(m->api_bus, &m->subscribed, false, m->deserialized_subscribed);
|
||||
r = bus_track_coldplug(m->api_bus, &m->subscribed, false, m->subscribe_serialization);
|
||||
if (r < 0)
|
||||
log_warning_errno(r, "Failed to deserialized tracked clients, ignoring: %m");
|
||||
m->deserialized_subscribed = strv_free(m->deserialized_subscribed);
|
||||
m->subscribe_serialization = strv_free(m->subscribe_serialization);
|
||||
|
||||
r = manager_varlink_init(m);
|
||||
if (r < 0)
|
||||
|
@ -340,7 +340,7 @@ struct Manager {
|
||||
considered subscribes, since they last for very short only,
|
||||
and it is much simpler that way. */
|
||||
sd_bus_track *subscribed;
|
||||
char **deserialized_subscribed;
|
||||
char **subscribe_serialization;
|
||||
|
||||
/* This is used during reloading: before the reload we queue
|
||||
* the reply message here, and afterwards we send it */
|
||||
|
Loading…
Reference in New Issue
Block a user