19969N/A--- /usr/tmp/clean/avahi-0.6.28/avahi-core/server.c 2010-08-26 01:51:38.993153000 +0100
19969N/A+++ avahi-0.6.28/avahi-core/server.c 2011-01-20 12:44:02.347982322 +0000
19969N/A@@ -1074,7 +1074,9 @@
19969N/A
19969N/A s->state = state;
19969N/A
19969N/A+#ifndef HAVE_BONJOUR
19969N/A avahi_interface_monitor_update_rrs(s->monitor, 0);
19969N/A+#endif
19969N/A
19969N/A if (s->callback)
19969N/A s->callback(s, state, s->userdata);
19969N/A@@ -1211,9 +1213,11 @@
19969N/A server_set_state(s, AVAHI_SERVER_REGISTERING);
19969N/A s->n_host_rr_pending ++; /** Make sure that the state isn't changed tp AVAHI_SERVER_RUNNING too early */
19969N/A
19969N/A+#ifndef HAVE_BONJOUR
19969N/A register_hinfo(s);
19969N/A register_browse_domain(s);
19969N/A avahi_interface_monitor_update_rrs(s->monitor, 0);
19969N/A+#endif
19969N/A
19969N/A assert(s->n_host_rr_pending > 0);
19969N/A s->n_host_rr_pending --;
19969N/A@@ -1373,6 +1377,10 @@
10786N/A else
10786N/A avahi_server_config_init(&s->config);
10786N/A
10786N/A+#ifdef HAVE_BONJOUR
10786N/A+ s->need_service_cleanup = 0;
10786N/A+ s->cleanup_time_event = NULL;
10786N/A+#else
10786N/A if ((e = setup_sockets(s)) < 0) {
10786N/A if (error)
10786N/A *error = e;
19969N/A@@ -1382,7 +1390,7 @@
19969N/A
19969N/A return NULL;
19969N/A }
19969N/A-
19969N/A+#endif
19969N/A s->n_host_rr_pending = 0;
19969N/A s->need_entry_cleanup = 0;
19969N/A s->need_group_cleanup = 0;
19969N/A@@ -1428,6 +1436,12 @@
10786N/A s->local_service_cookie = (uint32_t) rand() * (uint32_t) rand();
10786N/A } while (s->local_service_cookie == AVAHI_SERVICE_COOKIE_INVALID);
10786N/A
10786N/A+#ifdef HAVE_BONJOUR
10786N/A+ AVAHI_LLIST_HEAD_INIT(AvahiService, s->services);
10786N/A+ s->wide_area_lookup_engine = NULL;
10786N/A+ s->multicast_lookup_engine = NULL;
10786N/A+ s->monitor = NULL;
10786N/A+#else
10786N/A if (s->config.enable_wide_area) {
10786N/A s->wide_area_lookup_engine = avahi_wide_area_engine_new(s);
10786N/A avahi_wide_area_set_servers(s->wide_area_lookup_engine, s->config.wide_area_servers, s->config.n_wide_area_servers);
19969N/A@@ -1438,6 +1452,7 @@
19969N/A
19969N/A s->monitor = avahi_interface_monitor_new(s);
19969N/A avahi_interface_monitor_sync(s->monitor);
19969N/A+#endif
19969N/A
19969N/A register_localhost(s);
19969N/A register_stuff(s);
19969N/A@@ -1472,7 +1487,8 @@
10786N/A while(s->entries)
10786N/A avahi_entry_free(s, s->entries);
10786N/A
10786N/A- avahi_interface_monitor_free(s->monitor);
10786N/A+ if (s->monitor)
10786N/A+ avahi_interface_monitor_free(s->monitor);
10786N/A
10786N/A while (s->groups)
10786N/A avahi_entry_group_free(s, s->groups);
19969N/A@@ -1485,7 +1501,8 @@
19969N/A
19969N/A if (s->wide_area_lookup_engine)
19969N/A avahi_wide_area_engine_free(s->wide_area_lookup_engine);
19969N/A- avahi_multicast_lookup_engine_free(s->multicast_lookup_engine);
19969N/A+ if (s->multicast_lookup_engine)
19969N/A+ avahi_multicast_lookup_engine_free(s->multicast_lookup_engine);
19969N/A
19969N/A if (s->cleanup_time_event)
19969N/A avahi_time_event_free(s->cleanup_time_event);
19969N/A@@ -1524,6 +1541,11 @@
10786N/A
10786N/A avahi_server_config_free(&s->config);
10786N/A
10786N/A+#ifdef HAVE_BONJOUR
10786N/A+ if (s->cleanup_time_event)
10786N/A+ avahi_time_event_free(s->cleanup_time_event);
10786N/A+#endif
10786N/A+
10786N/A avahi_free(s);
10786N/A }
10786N/A