1 --- /usr/tmp/clean/avahi-0.6.28/avahi-core/server.c 2010-08-26 01:51:38.993153000 +0100
2 +++ avahi-0.6.28/avahi-core/server.c 2011-01-20 12:44:02.347982322 +0000
8 avahi_interface_monitor_update_rrs(s->monitor, 0);
12 s->callback(s, state, s->userdata);
13 @@ -1211,9 +1213,11 @@
14 server_set_state(s, AVAHI_SERVER_REGISTERING);
15 s->n_host_rr_pending ++; /** Make sure that the state isn't changed tp AVAHI_SERVER_RUNNING too early */
19 register_browse_domain(s);
20 avahi_interface_monitor_update_rrs(s->monitor, 0);
23 assert(s->n_host_rr_pending > 0);
24 s->n_host_rr_pending --;
25 @@ -1373,6 +1377,10 @@
27 avahi_server_config_init(&s->config);
30 + s->need_service_cleanup = 0;
31 + s->cleanup_time_event = NULL;
33 if ((e = setup_sockets(s)) < 0) {
42 s->n_host_rr_pending = 0;
43 s->need_entry_cleanup = 0;
44 s->need_group_cleanup = 0;
45 @@ -1428,6 +1436,12 @@
46 s->local_service_cookie = (uint32_t) rand() * (uint32_t) rand();
47 } while (s->local_service_cookie == AVAHI_SERVICE_COOKIE_INVALID);
50 + AVAHI_LLIST_HEAD_INIT(AvahiService, s->services);
51 + s->wide_area_lookup_engine = NULL;
52 + s->multicast_lookup_engine = NULL;
55 if (s->config.enable_wide_area) {
56 s->wide_area_lookup_engine = avahi_wide_area_engine_new(s);
57 avahi_wide_area_set_servers(s->wide_area_lookup_engine, s->config.wide_area_servers, s->config.n_wide_area_servers);
60 s->monitor = avahi_interface_monitor_new(s);
61 avahi_interface_monitor_sync(s->monitor);
64 register_localhost(s);
68 avahi_entry_free(s, s->entries);
70 - avahi_interface_monitor_free(s->monitor);
72 + avahi_interface_monitor_free(s->monitor);
75 avahi_entry_group_free(s, s->groups);
78 if (s->wide_area_lookup_engine)
79 avahi_wide_area_engine_free(s->wide_area_lookup_engine);
80 - avahi_multicast_lookup_engine_free(s->multicast_lookup_engine);
81 + if (s->multicast_lookup_engine)
82 + avahi_multicast_lookup_engine_free(s->multicast_lookup_engine);
84 if (s->cleanup_time_event)
85 avahi_time_event_free(s->cleanup_time_event);
86 @@ -1524,6 +1541,11 @@
88 avahi_server_config_free(&s->config);
91 + if (s->cleanup_time_event)
92 + avahi_time_event_free(s->cleanup_time_event);