summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-10-26 01:34:48 +0000
committerLennart Poettering <lennart@poettering.net>2005-10-26 01:34:48 +0000
commit182da3ab7be8f813a09f1807c1c76747eff02af6 (patch)
tree78290574d9052dd1778b5244fd77350a991ab259
parent8e1c41a6b493a4180fcad14ab885f40d88cf207f (diff)
reorder arguments of avahi_reverse_lookup_name() to make them more natural
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@874 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rw-r--r--avahi-common/address.c2
-rw-r--r--avahi-common/address.h2
-rw-r--r--avahi-common/alternative.h6
-rw-r--r--avahi-core/entry.c2
-rw-r--r--avahi-core/resolve-address.c2
-rw-r--r--docs/TODO2
6 files changed, 8 insertions, 8 deletions
diff --git a/avahi-common/address.c b/avahi-common/address.c
index 56b4058..640aa06 100644
--- a/avahi-common/address.c
+++ b/avahi-common/address.c
@@ -66,7 +66,7 @@ char *avahi_address_snprint(char *s, size_t length, const AvahiAddress *a) {
return s;
}
-char* avahi_reverse_lookup_name(char *ret_s, size_t length, const AvahiAddress *a) {
+char* avahi_reverse_lookup_name(const AvahiAddress *a, char *ret_s, size_t length) {
assert(ret_s);
assert(length > 0);
assert(a);
diff --git a/avahi-common/address.h b/avahi-common/address.h
index 53f8d06..6315d31 100644
--- a/avahi-common/address.h
+++ b/avahi-common/address.h
@@ -91,7 +91,7 @@ char *avahi_address_snprint(char *ret_s, size_t length, const AvahiAddress *a);
AvahiAddress *avahi_address_parse(const char *s, AvahiProtocol af, AvahiAddress *ret_addr);
/** Generate the DNS reverse lookup name for an IPv4 or IPv6 address. */
-char* avahi_reverse_lookup_name(char *ret_s, size_t length, const AvahiAddress *a);
+char* avahi_reverse_lookup_name(const AvahiAddress *a, char *ret_s, size_t length);
/** Map AVAHI_PROTO_xxx constants to Unix AF_xxx constants */
int avahi_proto_to_af(AvahiProtocol proto);
diff --git a/avahi-common/alternative.h b/avahi-common/alternative.h
index 4f0e58b..d171540 100644
--- a/avahi-common/alternative.h
+++ b/avahi-common/alternative.h
@@ -35,9 +35,9 @@ AVAHI_C_DECL_BEGIN
char *avahi_alternative_host_name(const char *s);
/** Find an alternative for the specified service name. If called with
- an original service name, " #2" is appended. Afterwards the number
- is increased on each call (i.e. "foo" becomes "foo #2" becomes
- "foo #3" and so on.) avahi_free() the result. */
+ * an original service name, " #2" is appended. Afterwards the number
+ * is increased on each call (i.e. "foo" becomes "foo #2" becomes "foo
+ * #3" and so on.) avahi_free() the result. */
char *avahi_alternative_service_name(const char *s);
AVAHI_C_DECL_END
diff --git a/avahi-core/entry.c b/avahi-core/entry.c
index 7afad47..1b6ab8b 100644
--- a/avahi-core/entry.c
+++ b/avahi-core/entry.c
@@ -441,7 +441,7 @@ int avahi_server_add_address(
if (!(flags & AVAHI_PUBLISH_NO_REVERSE)) {
char reverse_n[AVAHI_DOMAIN_NAME_MAX];
- avahi_reverse_lookup_name(reverse_n, sizeof(reverse_n), a);
+ avahi_reverse_lookup_name(a, reverse_n, sizeof(reverse_n));
if (!(reverse = server_add_ptr_internal(s, g, interface, protocol, flags | AVAHI_PUBLISH_UNIQUE, AVAHI_DEFAULT_TTL_HOST_NAME, reverse_n, name))) {
ret = avahi_server_errno(s);
diff --git a/avahi-core/resolve-address.c b/avahi-core/resolve-address.c
index c9aae0c..03e8967 100644
--- a/avahi-core/resolve-address.c
+++ b/avahi-core/resolve-address.c
@@ -203,7 +203,7 @@ AvahiSAddressResolver *avahi_s_address_resolver_new(
return NULL;
}
- avahi_reverse_lookup_name(n, sizeof(n), address);
+ avahi_reverse_lookup_name(address, n, sizeof(n));
if (!(k = avahi_key_new(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_PTR))) {
avahi_server_set_errno(server, AVAHI_ERR_NO_MEMORY);
diff --git a/docs/TODO b/docs/TODO
index e783914..1712ea0 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -4,7 +4,6 @@ for 0.6:
* add support for subtypes in static services
* Add static host configuration like static services [lathiat]
* wrap avahi_server_add_record() via DBUS and in avahi-client [lathiat]
-* unify argument order of functions returning a string in a user supplied buffer
later:
* add simplification routine for adding services
@@ -97,3 +96,4 @@ done:
* make sure that all limit definitions end with _MAX
* generate local CNAME responses
* remove irrelevant functions from pubic rr.h API
+* unify argument order of functions returning a string in a user supplied buffer