X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-daemon%2Fstatic-services.c;h=03824fde497b04511de758302a7ed47a3ee0bb07;hb=b789f76475170c84fce85383279aa8f683ad1ff9;hp=0fdff1400209e8ed73baee47f45ffa4042eca0cc;hpb=0632e854728e8e64552ae08f90852d4a2658539e;p=catta diff --git a/avahi-daemon/static-services.c b/avahi-daemon/static-services.c index 0fdff14..03824fd 100644 --- a/avahi-daemon/static-services.c +++ b/avahi-daemon/static-services.c @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include "main.h" @@ -63,7 +63,7 @@ struct StaticServiceGroup { gchar *name, *chosen_name; gboolean replace_wildcards; - AvahiEntryGroup *entry_group; + AvahiSEntryGroup *entry_group; AVAHI_LLIST_HEAD(StaticService, services); AVAHI_LLIST_FIELDS(StaticServiceGroup, groups); }; @@ -153,7 +153,7 @@ static void static_service_group_free(StaticServiceGroup *g) { g_assert(g); if (g->entry_group) - avahi_entry_group_free(g->entry_group); + avahi_s_entry_group_free(g->entry_group); while (g->services) static_service_free(g->services); @@ -166,7 +166,7 @@ static void static_service_group_free(StaticServiceGroup *g) { g_free(g); } -static void entry_group_callback(AvahiServer *s, AvahiEntryGroup *eg, AvahiEntryGroupState state, gpointer userdata) { +static void entry_group_callback(AvahiServer *s, AvahiSEntryGroup *eg, AvahiEntryGroupState state, gpointer userdata) { StaticServiceGroup *g = userdata; g_assert(s); @@ -202,9 +202,9 @@ static void add_static_service_group_to_server(StaticServiceGroup *g) { g->chosen_name = g_strdup(g->name); if (!g->entry_group) - g->entry_group = avahi_entry_group_new(avahi_server, entry_group_callback, g); + g->entry_group = avahi_s_entry_group_new(avahi_server, entry_group_callback, g); - g_assert(avahi_entry_group_is_empty(g->entry_group)); + g_assert(avahi_s_entry_group_is_empty(g->entry_group)); for (s = g->services; s; s = s->services_next) { @@ -223,14 +223,14 @@ static void add_static_service_group_to_server(StaticServiceGroup *g) { } } - avahi_entry_group_commit(g->entry_group); + avahi_s_entry_group_commit(g->entry_group); } static void remove_static_service_group_from_server(StaticServiceGroup *g) { g_assert(g); if (g->entry_group) - avahi_entry_group_reset(g->entry_group); + avahi_s_entry_group_reset(g->entry_group); } typedef enum { @@ -349,7 +349,7 @@ static void XMLCALL xml_end(void *data, const char *el) { case XML_TAG_SERVICE: - if (u->service->port == 0 || !u->service->type) { + if (!u->service->type) { avahi_log_error("%s: parse failure: service incomplete.", u->group->filename); u->failed = TRUE; return; @@ -369,7 +369,7 @@ static void XMLCALL xml_end(void *data, const char *el) { p = u->buf ? atoi(u->buf) : 0; - if (p <= 0 || p > 0xFFFF) { + if (p < 0 || p > 0xFFFF) { avahi_log_error("%s: parse failure: invalid port specification \"%s\".", u->group->filename, u->buf); u->failed = TRUE; return;