Name: avahi-core
Description: Avahi Embeddable Multicast DNS Engine
Version: @PACKAGE_VERSION@
-Libs: -L${libdir} -lavahic-core
+Libs: -L${libdir} -lavahi-core
Cflags: -D_REENTRANT -I${includedir}
# This cool debug trap works on i386/gcc only
AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+avahiincludedir=$(includedir)/avahi-core
+
+avahiinclude_HEADERS = \
+ rr.h \
+ address.h \
+ strlst.h \
+ core.h \
+ alternative.h
+
lib_LTLIBRARIES = \
libavahi-core.la
loop = g_main_loop_new(NULL, FALSE);
/* g_timeout_add(1000*5, dump_timeout, server); */
-/* g_timeout_add(1000*30, quit_timeout, loop); */
+ g_timeout_add(1000*30, quit_timeout, loop);
g_main_loop_run(loop);
g_main_loop_unref(loop);
r->callback = callback;
r->userdata = userdata;
+ avahi_elapse_time(&tv, 1000, 0);
+ r->time_event = avahi_time_event_queue_add(server->time_event_queue, &tv, time_event_callback, r);
+
+ AVAHI_LLIST_PREPEND(AvahiAddressResolver, resolver, server->address_resolvers, r);
+
if (address->family == AF_INET)
n = avahi_reverse_lookup_name_ipv4(&address->data.ipv4);
else
r->record_browser = avahi_record_browser_new(server, interface, protocol, k, record_browser_callback, r);
avahi_key_unref(k);
- avahi_elapse_time(&tv, 1000, 0);
- r->time_event = avahi_time_event_queue_add(server->time_event_queue, &tv, time_event_callback, r);
-
- AVAHI_LLIST_PREPEND(AvahiAddressResolver, resolver, server->address_resolvers, r);
return r;
}
r->callback = callback;
r->userdata = userdata;
+ r->record_browser_a = r->record_browser_aaaa = NULL;
+
+ avahi_elapse_time(&tv, 1000, 0);
+ r->time_event = avahi_time_event_queue_add(server->time_event_queue, &tv, time_event_callback, r);
+
+ AVAHI_LLIST_PREPEND(AvahiHostNameResolver, resolver, server->host_name_resolvers, r);
+
+
if (aprotocol == AF_INET || aprotocol == AF_UNSPEC) {
k = avahi_key_new(host_name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_A);
r->record_browser_a = avahi_record_browser_new(server, interface, protocol, k, record_browser_callback, r);
avahi_key_unref(k);
- } else
- r->record_browser_a = NULL;
+ }
if (aprotocol == AF_INET6 || aprotocol == AF_UNSPEC) {
k = avahi_key_new(host_name, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_AAAA);
r->record_browser_aaaa = avahi_record_browser_new(server, interface, protocol, k, record_browser_callback, r);
avahi_key_unref(k);
- } else
- r->record_browser_aaaa = NULL;
-
- avahi_elapse_time(&tv, 1000, 0);
- r->time_event = avahi_time_event_queue_add(server->time_event_queue, &tv, time_event_callback, r);
-
- AVAHI_LLIST_PREPEND(AvahiHostNameResolver, resolver, server->host_name_resolvers, r);
+ }
return r;
}
avahi_escape_label((guint8*) name, strlen(name), &n, &l);
snprintf(n, l, ".%s%s", r->service_type, r->domain_name);
- g_message("<%s>", t);
+ avahi_elapse_time(&tv, 1000, 0);
+ r->time_event = avahi_time_event_queue_add(server->time_event_queue, &tv, time_event_callback, r);
+
+ AVAHI_LLIST_PREPEND(AvahiServiceResolver, resolver, server->service_resolvers, r);
+
+ r->record_browser_a = r->record_browser_aaaa = r->record_browser_srv = r->record_browser_txt = NULL;
k = avahi_key_new(t, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_SRV);
r->record_browser_srv = avahi_record_browser_new(server, interface, protocol, k, record_browser_callback, r);
r->record_browser_txt = avahi_record_browser_new(server, interface, protocol, k, record_browser_callback, r);
avahi_key_unref(k);
- r->record_browser_a = r->record_browser_aaaa = NULL;
-
- avahi_elapse_time(&tv, 1000, 0);
- r->time_event = avahi_time_event_queue_add(server->time_event_queue, &tv, time_event_callback, r);
-
- AVAHI_LLIST_PREPEND(AvahiServiceResolver, resolver, server->service_resolvers, r);
-
return r;
}