mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-03-10 00:58:20 +03:00
resolved: rename field to indicate that it's a list
This commit is contained in:
parent
64903d18df
commit
d70f15f5aa
@ -1988,7 +1988,7 @@ static int bus_method_register_service(sd_bus_message *message, void *userdata,
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
LIST_INSERT_AFTER(items, txt_data->txt, last, i);
|
||||
LIST_INSERT_AFTER(items, txt_data->txts, last, i);
|
||||
last = i;
|
||||
|
||||
r = sd_bus_message_exit_container(message);
|
||||
@ -2003,7 +2003,7 @@ static int bus_method_register_service(sd_bus_message *message, void *userdata,
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (txt_data->txt) {
|
||||
if (txt_data->txts) {
|
||||
LIST_PREPEND(items, service->txt_data_items, txt_data);
|
||||
txt_data = NULL;
|
||||
}
|
||||
@ -2022,7 +2022,7 @@ static int bus_method_register_service(sd_bus_message *message, void *userdata,
|
||||
if (!txt_data)
|
||||
return log_oom();
|
||||
|
||||
r = dns_txt_item_new_empty(&txt_data->txt);
|
||||
r = dns_txt_item_new_empty(&txt_data->txts);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
@ -390,11 +390,11 @@ int config_parse_dnssd_txt(
|
||||
assert_not_reached();
|
||||
}
|
||||
|
||||
LIST_INSERT_AFTER(items, txt_data->txt, last, i);
|
||||
LIST_INSERT_AFTER(items, txt_data->txts, last, i);
|
||||
last = i;
|
||||
}
|
||||
|
||||
if (txt_data->txt) {
|
||||
if (txt_data->txts) {
|
||||
LIST_PREPEND(items, s->txt_data_items, txt_data);
|
||||
TAKE_PTR(txt_data);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ DnssdTxtData *dnssd_txtdata_free(DnssdTxtData *txt_data) {
|
||||
return NULL;
|
||||
|
||||
dns_resource_record_unref(txt_data->rr);
|
||||
dns_txt_item_free_all(txt_data->txt);
|
||||
dns_txt_item_free_all(txt_data->txts);
|
||||
|
||||
return mfree(txt_data);
|
||||
}
|
||||
@ -112,7 +112,7 @@ static int dnssd_service_load(Manager *manager, const char *filename) {
|
||||
if (!txt_data)
|
||||
return log_oom();
|
||||
|
||||
r = dns_txt_item_new_empty(&txt_data->txt);
|
||||
r = dns_txt_item_new_empty(&txt_data->txts);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@ -237,7 +237,7 @@ int dnssd_update_rrs(DnssdService *s) {
|
||||
goto oom;
|
||||
|
||||
txt_data->rr->ttl = MDNS_DEFAULT_TTL;
|
||||
txt_data->rr->txt.items = dns_txt_item_copy(txt_data->txt);
|
||||
txt_data->rr->txt.items = dns_txt_item_copy(txt_data->txts);
|
||||
if (!txt_data->rr->txt.items)
|
||||
goto oom;
|
||||
}
|
||||
|
@ -13,13 +13,13 @@ typedef struct DnsTxtItem DnsTxtItem;
|
||||
|
||||
enum {
|
||||
DNS_TXT_ITEM_TEXT,
|
||||
DNS_TXT_ITEM_DATA
|
||||
DNS_TXT_ITEM_DATA,
|
||||
};
|
||||
|
||||
struct DnssdTxtData {
|
||||
DnsResourceRecord *rr;
|
||||
|
||||
LIST_HEAD(DnsTxtItem, txt);
|
||||
LIST_HEAD(DnsTxtItem, txts);
|
||||
|
||||
LIST_FIELDS(DnssdTxtData, items);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user