summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFederico Lucifredi <flucifredi@acm.org>2007-12-27 06:33:38 +0000
committerFederico Lucifredi <flucifredi@acm.org>2007-12-27 06:33:38 +0000
commit96d5eb47bcc4ad5cd938f8f2229d2c93caf7db44 (patch)
tree87f040ea534a19b1ea5b157e7f3ac649503ce3d1
parentd3d1506dd03c6afff8e0bb0b9a9f6605e17b0c37 (diff)
fixes.
git-svn-id: file:///home/lennart/svn/public/avahi/branches/federico@1648 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rw-r--r--avahi-core/domain-util.c7
-rw-r--r--avahi-core/domain-util.h3
2 files changed, 8 insertions, 2 deletions
diff --git a/avahi-core/domain-util.c b/avahi-core/domain-util.c
index 7d03afa..c98963c 100644
--- a/avahi-core/domain-util.c
+++ b/avahi-core/domain-util.c
@@ -195,10 +195,13 @@ char * c_to_canonical_string(char* input)
while(avahi_unescape_label(&input, label, AVAHI_LABEL_MAX))
{
- result++ = strlen(label);
+ *result = (char)strlen(label);
+ result++;
do {
- result++ = label++;
+ *result = *label;
+ result++;
+ label++;
} while(*label)
printf("intermediate result: -%s-\n", result);*/
diff --git a/avahi-core/domain-util.h b/avahi-core/domain-util.h
index 01233d8..6e51854 100644
--- a/avahi-core/domain-util.h
+++ b/avahi-core/domain-util.h
@@ -42,6 +42,9 @@ int avahi_binary_domain_cmp(const char *a, const char *b);
/** Returns 1 if the the end labels of domain are eqal to suffix */
int avahi_domain_ends_with(const char *domain, const char *suffix);
+/** returns canonical DNS representation of C string representing a domain */
+char * c_to_canonical_string(char* input)
+
AVAHI_C_DECL_END
#endif