summaryrefslogtreecommitdiffstats
path: root/avahi-daemon/simple-protocol.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-08-13 21:25:09 +0000
committerLennart Poettering <lennart@poettering.net>2005-08-13 21:25:09 +0000
commit4f0a5e7572a4257894b4bfede42c26d65152609e (patch)
tree21e3d5ee20716739590e5931859a4c2052161395 /avahi-daemon/simple-protocol.c
parentd6d7d3769441b73ffb5b7af34fef823b41e66312 (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-daemon/simple-protocol.c')
-rw-r--r--avahi-daemon/simple-protocol.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/avahi-daemon/simple-protocol.c b/avahi-daemon/simple-protocol.c
index 39af043..12d8adb 100644
--- a/avahi-daemon/simple-protocol.c
+++ b/avahi-daemon/simple-protocol.c
@@ -164,12 +164,19 @@ static void client_output_printf(Client *c, const gchar *format, ...) {
}
-static void host_name_resolver_callback(AvahiHostNameResolver *r, AvahiIfIndex iface, AvahiProtocol protocol, AvahiBrowserEvent event, const gchar *hostname, const AvahiAddress *a, gpointer userdata) {
+static void host_name_resolver_callback(
+ AvahiHostNameResolver *r,
+ AvahiIfIndex iface,
+ AvahiProtocol protocol,
+ AvahiResolverEvent event,
+ const char *hostname,
+ const AvahiAddress *a,
+ void* userdata) {
+
Client *c = userdata;
g_assert(c);
-
if (event == AVAHI_RESOLVER_TIMEOUT)
client_output_printf(c, "%+i Query timed out\n", AVAHI_ERR_TIMEOUT);
else {
@@ -181,9 +188,16 @@ static void host_name_resolver_callback(AvahiHostNameResolver *r, AvahiIfIndex i
c->state = CLIENT_DEAD;
}
-static void address_resolver_callback(AvahiAddressResolver *r, AvahiIfIndex iface, AvahiProtocol protocol, AvahiBrowserEvent event, const AvahiAddress *a, const gchar *hostname, gpointer userdata) {
- Client *c = userdata;
+static void address_resolver_callback(
+ AvahiAddressResolver *r,
+ AvahiIfIndex iface,
+ AvahiProtocol protocol,
+ AvahiResolverEvent event,
+ const AvahiAddress *a,
+ const char *hostname,
+ void* userdata) {
+ Client *c = userdata;
g_assert(c);
@@ -195,7 +209,7 @@ static void address_resolver_callback(AvahiAddressResolver *r, AvahiIfIndex ifac
c->state = CLIENT_DEAD;
}
-static void dns_server_browser_callback(AvahiDNSServerBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const gchar *host_name, const AvahiAddress *a, guint16 port, gpointer userdata) {
+static void dns_server_browser_callback(AvahiDNSServerBrowser *b, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, const char *host_name, const AvahiAddress *a, uint16_t port, void* userdata) {
Client *c = userdata;
gchar t[64];