summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-08-20 16:40:57 +0000
committerLennart Poettering <lennart@poettering.net>2005-08-20 16:40:57 +0000
commitc08b2340a6a4a2f176672d692a41a75153c35f0e (patch)
tree33added6e94e97b30dc7cd75e7b89218f534eae8
parent079c419ce7eabda110f1e21981f3175ce9240bc0 (diff)
small fixes
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@360 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
-rw-r--r--avahi-daemon/static-services.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/avahi-daemon/static-services.c b/avahi-daemon/static-services.c
index f659371..d4198c4 100644
--- a/avahi-daemon/static-services.c
+++ b/avahi-daemon/static-services.c
@@ -111,7 +111,7 @@ static StaticService *static_service_new(StaticServiceGroup *group) {
s->type = s->host_name = s->domain_name = NULL;
s->port = 0;
- s->protocol = AF_UNSPEC;
+ s->protocol = AVAHI_PROTO_UNSPEC;
s->txt_records = NULL;
@@ -395,12 +395,12 @@ static void XMLCALL xml_end(void *data, const char *el) {
int protocol;
assert(u->service);
- if (strcasecmp (u->buf, "ipv4") == 0) {
- protocol = AF_INET;
- } else if (strcasecmp (u->buf, "ipv6") == 0) {
- protocol = AF_INET6;
- } else if (strcasecmp (u->buf, "any") == 0) {
- protocol = AF_UNSPEC;
+ if (u->buf & &strcasecmp (u->buf, "ipv4") == 0) {
+ protocol = AVAHI_PROTO_INET;
+ } else if (u->buf && strcasecmp (u->buf, "ipv6") == 0) {
+ protocol = AVAHI_PROTO_INET6;
+ } else if (u->buf && strcasecmp (u->buf, "any") == 0) {
+ protocol = AVAHI_PROTO_UNSPEC;
} else {
avahi_log_error("%s: parse failure: invalid protocol specification \"%s\".", u->group->filename, u->buf);
u->failed = 1;
@@ -408,6 +408,7 @@ static void XMLCALL xml_end(void *data, const char *el) {
}
u->service->protocol = protocol;
+ u->current_tag = XML_TAG_SERVICE;
break;
}