diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-08-13 21:25:09 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-08-13 21:25:09 +0000 |
commit | 4f0a5e7572a4257894b4bfede42c26d65152609e (patch) | |
tree | 21e3d5ee20716739590e5931859a4c2052161395 /avahi-discover-standalone/main.c | |
parent | d6d7d3769441b73ffb5b7af34fef823b41e66312 (diff) |
* strip glib from avahi-core
* implement glib memory allocator
* add new documentation file MALLOC
* initialize pseudo-RNG from /dev/urandom in avahi-daemon
* remove some gcc 4.0 warnings
* beef up watch system with real timeouts
* move GCC __attribute__ macros into its own header avahi-common/gccmacro.h
* make use of GCC's sentinel attribute where it make sense
* add malloc() implementations that abort on OOM and enable them by default
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@308 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-discover-standalone/main.c')
-rw-r--r-- | avahi-discover-standalone/main.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/avahi-discover-standalone/main.c b/avahi-discover-standalone/main.c index 00984ec..926f4c4 100644 --- a/avahi-discover-standalone/main.c +++ b/avahi-discover-standalone/main.c @@ -29,7 +29,9 @@ #include <glade/glade.h> #include <avahi-core/core.h> #include <avahi-common/strlst.h> -#include <avahi-common/util.h> +#include <avahi-common/domain.h> +#include <avahi-glib/glib-watch.h> +#include <avahi-glib/glib-malloc.h> struct ServiceType; @@ -268,10 +270,15 @@ int main(int argc, char *argv[]) { AvahiServerConfig config; GtkTreeViewColumn *c; gint error; + AvahiGLibPoll *poll_api; gtk_init(&argc, &argv); glade_init(); + avahi_set_allocator(avahi_glib_allocator()); + + poll_api = avahi_glib_poll_new(NULL); + xml = glade_xml_new(AVAHI_INTERFACES_DIR"avahi-discover.glade", NULL, NULL); main_window = glade_xml_get_widget(xml, "main_window"); g_signal_connect(main_window, "delete-event", (GCallback) main_window_on_delete_event, NULL); @@ -294,7 +301,7 @@ int main(int argc, char *argv[]) { avahi_server_config_init(&config); config.publish_hinfo = config.publish_addresses = config.publish_domain = config.publish_workstation = FALSE; - server = avahi_server_new(NULL, &config, NULL, NULL, &error); + server = avahi_server_new(avahi_glib_poll_get(poll_api), &config, NULL, NULL, &error); avahi_server_config_free(&config); g_assert(server); @@ -304,6 +311,7 @@ int main(int argc, char *argv[]) { gtk_main(); avahi_server_free(server); + avahi_glib_poll_free(poll_api); return 0; } |