libsoup3: update to 3.6.0; fix GTK2/3 app startup
[oi-userland.git] / components / network / avahi / patches / 06-server.patch
blob496b4625cf2f7a3452ea2f25beed08ff337675d4
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
3 @@ -1074,7 +1074,9 @@
5 s->state = state;
7 +#ifndef HAVE_BONJOUR
8 avahi_interface_monitor_update_rrs(s->monitor, 0);
9 +#endif
11 if (s->callback)
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 */
17 +#ifndef HAVE_BONJOUR
18 register_hinfo(s);
19 register_browse_domain(s);
20 avahi_interface_monitor_update_rrs(s->monitor, 0);
21 +#endif
23 assert(s->n_host_rr_pending > 0);
24 s->n_host_rr_pending --;
25 @@ -1373,6 +1377,10 @@
26 else
27 avahi_server_config_init(&s->config);
29 +#ifdef HAVE_BONJOUR
30 + s->need_service_cleanup = 0;
31 + s->cleanup_time_event = NULL;
32 +#else
33 if ((e = setup_sockets(s)) < 0) {
34 if (error)
35 *error = e;
36 @@ -1382,7 +1390,7 @@
38 return NULL;
41 +#endif
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);
49 +#ifdef HAVE_BONJOUR
50 + AVAHI_LLIST_HEAD_INIT(AvahiService, s->services);
51 + s->wide_area_lookup_engine = NULL;
52 + s->multicast_lookup_engine = NULL;
53 + s->monitor = NULL;
54 +#else
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);
58 @@ -1438,6 +1452,7 @@
60 s->monitor = avahi_interface_monitor_new(s);
61 avahi_interface_monitor_sync(s->monitor);
62 +#endif
64 register_localhost(s);
65 register_stuff(s);
66 @@ -1472,7 +1487,8 @@
67 while(s->entries)
68 avahi_entry_free(s, s->entries);
70 - avahi_interface_monitor_free(s->monitor);
71 + if (s->monitor)
72 + avahi_interface_monitor_free(s->monitor);
74 while (s->groups)
75 avahi_entry_group_free(s, s->groups);
76 @@ -1485,7 +1501,8 @@
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);
90 +#ifdef HAVE_BONJOUR
91 + if (s->cleanup_time_event)
92 + avahi_time_event_free(s->cleanup_time_event);
93 +#endif
95 avahi_free(s);