summaryrefslogtreecommitdiffstats
path: root/avahi-core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-05-22 21:33:28 +0000
committerLennart Poettering <lennart@poettering.net>2005-05-22 21:33:28 +0000
commit5d67f2aefcdb84d2938fdc522d1f906ca6616e3d (patch)
tree42b1a9f2089b736e21144d0d5bfc537044d9b154 /avahi-core
parentda69334ace7a4620e67fbf0a3eed61835d272ae3 (diff)
* fix pkgconfig file
* fix recursive resolving * install header files git-svn-id: file:///home/lennart/svn/public/avahi/trunk@89 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core')
-rw-r--r--avahi-core/Makefile.am9
-rw-r--r--avahi-core/avahi-test.c2
-rw-r--r--avahi-core/resolve-address.c9
-rw-r--r--avahi-core/resolve-host-name.c19
-rw-r--r--avahi-core/resolve-service.c14
5 files changed, 31 insertions, 22 deletions
diff --git a/avahi-core/Makefile.am b/avahi-core/Makefile.am
index 0e73c7f..6fe184a 100644
--- a/avahi-core/Makefile.am
+++ b/avahi-core/Makefile.am
@@ -26,6 +26,15 @@ AM_LDADD=$(GLIB20_LIBS)
# 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
diff --git a/avahi-core/avahi-test.c b/avahi-core/avahi-test.c
index 805453a..1c3dc57 100644
--- a/avahi-core/avahi-test.c
+++ b/avahi-core/avahi-test.c
@@ -206,7 +206,7 @@ int main(int argc, char *argv[]) {
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);
diff --git a/avahi-core/resolve-address.c b/avahi-core/resolve-address.c
index f6fa635..53e4468 100644
--- a/avahi-core/resolve-address.c
+++ b/avahi-core/resolve-address.c
@@ -94,6 +94,11 @@ AvahiAddressResolver *avahi_address_resolver_new(AvahiServer *server, gint inter
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
@@ -105,10 +110,6 @@ AvahiAddressResolver *avahi_address_resolver_new(AvahiServer *server, gint inter
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;
}
diff --git a/avahi-core/resolve-host-name.c b/avahi-core/resolve-host-name.c
index 751ba72..f29b575 100644
--- a/avahi-core/resolve-host-name.c
+++ b/avahi-core/resolve-host-name.c
@@ -119,24 +119,25 @@ AvahiHostNameResolver *avahi_host_name_resolver_new(AvahiServer *server, gint in
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;
}
diff --git a/avahi-core/resolve-service.c b/avahi-core/resolve-service.c
index 5c0c988..e854cca 100644
--- a/avahi-core/resolve-service.c
+++ b/avahi-core/resolve-service.c
@@ -221,7 +221,12 @@ AvahiServiceResolver *avahi_service_resolver_new(AvahiServer *server, gint inter
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);
@@ -231,13 +236,6 @@ AvahiServiceResolver *avahi_service_resolver_new(AvahiServer *server, gint inter
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;
}