summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--avahi-client/entrygroup.c46
-rw-r--r--avahi-client/publish.h24
-rw-r--r--avahi-core/entry.c39
-rw-r--r--avahi-core/publish.h26
4 files changed, 6 insertions, 129 deletions
diff --git a/avahi-client/entrygroup.c b/avahi-client/entrygroup.c
index 9d58afb..cd84534 100644
--- a/avahi-client/entrygroup.c
+++ b/avahi-client/entrygroup.c
@@ -477,36 +477,15 @@ int avahi_entry_group_add_service(
va_list va;
int r;
-
- assert(group);
-
- va_start(va, port);
- r = avahi_entry_group_add_service_va(group, interface, protocol, flags, name, type, domain, host, port, va);
- va_end(va);
- return r;
-}
-
-int avahi_entry_group_add_service_va(
- AvahiEntryGroup *group,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- const char *host,
- uint16_t port,
- va_list va) {
-
- int r;
AvahiStringList *txt;
assert(group);
+ va_start(va, port);
txt = avahi_string_list_new_va(va);
r = avahi_entry_group_add_service_strlst(group, interface, protocol, flags, name, type, domain, host, port, txt);
avahi_string_list_free(txt);
-
+ va_end(va);
return r;
}
@@ -611,30 +590,13 @@ int avahi_entry_group_update_service_txt(
va_list va;
int r;
-
- va_start(va, domain);
- r = avahi_entry_group_update_service_txt_va(group, interface, protocol, flags, name, type, domain, va);
- va_end(va);
- return r;
-}
-
-int avahi_entry_group_update_service_txt_va(
- AvahiEntryGroup *group,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- va_list va) {
-
- int r;
AvahiStringList *txt;
+ va_start(va, domain);
txt = avahi_string_list_new_va(va);
r = avahi_entry_group_update_service_txt_strlst(group, interface, protocol, flags, name, type, domain, txt);
avahi_string_list_free(txt);
-
+ va_end(va);
return r;
}
diff --git a/avahi-client/publish.h b/avahi-client/publish.h
index cdce887..88c4498 100644
--- a/avahi-client/publish.h
+++ b/avahi-client/publish.h
@@ -96,19 +96,6 @@ int avahi_entry_group_add_service_strlst(
uint16_t port,
AvahiStringList *txt);
-/** Add a service, takes a NULL terminated va_list for text records */
-int avahi_entry_group_add_service_va(
- AvahiEntryGroup *group,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- const char *host,
- uint16_t port,
- va_list va);
-
/** Add a subtype for a service */
int avahi_entry_group_add_service_subtype(
AvahiEntryGroup *group,
@@ -142,17 +129,6 @@ int avahi_entry_group_update_service_txt_strlst(
const char *domain,
AvahiStringList *strlst);
-/** Update a TXT record for an existing service */
-int avahi_entry_group_update_service_txt_va(
- AvahiEntryGroup *g,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- va_list va);
-
/** Add a host/address pair */
int avahi_entry_group_add_address(
AvahiEntryGroup *group,
diff --git a/avahi-core/entry.c b/avahi-core/entry.c
index 3b73ff3..e4008bc 100644
--- a/avahi-core/entry.c
+++ b/avahi-core/entry.c
@@ -612,26 +612,6 @@ int avahi_server_add_service_strlst(
return server_add_service_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, host, port, avahi_string_list_copy(strlst));
}
-int avahi_server_add_service_va(
- AvahiServer *s,
- AvahiSEntryGroup *g,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- const char *host,
- uint16_t port,
- va_list va) {
-
- assert(s);
- assert(type);
- assert(name);
-
- return server_add_service_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, host, port, avahi_string_list_new_va(va));
-}
-
int avahi_server_add_service(
AvahiServer *s,
AvahiSEntryGroup *g,
@@ -649,7 +629,7 @@ int avahi_server_add_service(
int ret;
va_start(va, port);
- ret = avahi_server_add_service_va(s, g, interface, protocol, flags, name, type, domain, host, port, va);
+ ret = server_add_service_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, host, port, avahi_string_list_new_va(va));
va_end(va);
return ret;
@@ -716,21 +696,6 @@ int avahi_server_update_service_txt_strlst(
return server_update_service_txt_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, avahi_string_list_copy(strlst));
}
-/** Update the TXT record for a service with the NULL terminated list of strings of the va_list. */
-int avahi_server_update_service_txt_va(
- AvahiServer *s,
- AvahiSEntryGroup *g,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- va_list va) {
-
- return server_update_service_txt_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, avahi_string_list_new_va(va));
-}
-
/** Update the TXT record for a service with the NULL termonate list of strings */
int avahi_server_update_service_txt(
AvahiServer *s,
@@ -747,7 +712,7 @@ int avahi_server_update_service_txt(
int ret;
va_start(va, domain);
- ret = avahi_server_update_service_txt_va(s, g, interface, protocol, flags, name, type, domain, va);
+ ret = server_update_service_txt_strlst_nocopy(s, g, interface, protocol, flags, name, type, domain, avahi_string_list_new_va(va));
va_end(va);
return ret;
diff --git a/avahi-core/publish.h b/avahi-core/publish.h
index 38e5116..281ed42 100644
--- a/avahi-core/publish.h
+++ b/avahi-core/publish.h
@@ -121,20 +121,6 @@ int avahi_server_add_service(
uint16_t port, /**< Port number of the service */
... /**< Text records, terminated by NULL */) AVAHI_GCC_SENTINEL;
-/** Mostly identical to avahi_server_add_service(), but takes an va_list for the TXT records. */
-int avahi_server_add_service_va(
- AvahiServer *s,
- AvahiSEntryGroup *g,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- const char *host,
- uint16_t port,
- va_list va);
-
/** Mostly identical to avahi_server_add_service(), but takes an AvahiStringList object for the TXT records. The AvahiStringList object is copied. */
int avahi_server_add_service_strlst(
AvahiServer *s,
@@ -173,18 +159,6 @@ int avahi_server_update_service_txt_strlst(
const char *domain,
AvahiStringList *strlst);
-/** Update the TXT record for a service with the NULL terminated list of strings of the va_list. */
-int avahi_server_update_service_txt_va(
- AvahiServer *s,
- AvahiSEntryGroup *g,
- AvahiIfIndex interface,
- AvahiProtocol protocol,
- AvahiPublishFlags flags,
- const char *name,
- const char *type,
- const char *domain,
- va_list va);
-
/** Update the TXT record for a service with the NULL termonate list of strings */
int avahi_server_update_service_txt(
AvahiServer *s,