From f43187377e0c89ba02ca23e88efa01bbb255e037 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 2 Aug 2005 23:57:07 +0000 Subject: * replace guchar and gint by AvahiProtocol, AvahiIfIndex at many places where it make sense * change avahi_add_{service,txt}_strlst() to copy the string list * gcc warning fixes from Ikke * limit number of DBUS connections * limit objects created by a DBUS client * limit number of clients * limit number of entries a client may create * add legal blurb to avahi-discover * remove some obsolete import prototypes from avahi-discover * don't include config.h in dbus.h * add string definitions for DBUS errors git-svn-id: file:///home/lennart/svn/public/avahi/trunk@212 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/avahi-test.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'avahi-core/avahi-test.c') diff --git a/avahi-core/avahi-test.c b/avahi-core/avahi-test.c index f966659..d91e698 100644 --- a/avahi-core/avahi-test.c +++ b/avahi-core/avahi-test.c @@ -51,7 +51,7 @@ static gboolean dump_timeout(gpointer data) { return TRUE; } -static void record_browser_callback(AvahiRecordBrowser *r, gint interface, guchar protocol, AvahiBrowserEvent event, AvahiRecord *record, gpointer userdata) { +static void record_browser_callback(AvahiRecordBrowser *r, AvahiIfIndex interface, AvahiProtocol protocol, AvahiBrowserEvent event, AvahiRecord *record, gpointer userdata) { gchar *t; g_assert(r); @@ -150,7 +150,7 @@ fail: group = NULL; } -static void hnr_callback(AvahiHostNameResolver *r, gint iface, guchar protocol, AvahiBrowserEvent event, const gchar *hostname, const AvahiAddress *a, gpointer userdata) { +static void hnr_callback(AvahiHostNameResolver *r, AvahiIfIndex iface, AvahiProtocol protocol, AvahiBrowserEvent event, const gchar *hostname, const AvahiAddress *a, gpointer userdata) { gchar t[64]; if (a) @@ -159,7 +159,7 @@ static void hnr_callback(AvahiHostNameResolver *r, gint iface, guchar protocol, avahi_log_debug("HNR: (%i.%i) <%s> -> %s [%s]", iface, protocol, hostname, a ? t : "n/a", event == AVAHI_RESOLVER_FOUND ? "found" : "timeout"); } -static void ar_callback(AvahiAddressResolver *r, gint iface, guchar protocol, AvahiBrowserEvent event, const AvahiAddress *a, const gchar *hostname, gpointer userdata) { +static void ar_callback(AvahiAddressResolver *r, AvahiIfIndex iface, AvahiProtocol protocol, AvahiBrowserEvent event, const AvahiAddress *a, const gchar *hostname, gpointer userdata) { gchar t[64]; avahi_address_snprint(t, sizeof(t), a); @@ -167,21 +167,21 @@ static void ar_callback(AvahiAddressResolver *r, gint iface, guchar protocol, Av avahi_log_debug("AR: (%i.%i) %s -> <%s> [%s]", iface, protocol, t, hostname ? hostname : "n/a", event == AVAHI_RESOLVER_FOUND ? "found" : "timeout"); } -static void db_callback(AvahiDomainBrowser *b, gint iface, guchar protocol, AvahiBrowserEvent event, const gchar *domain, gpointer userdata) { +static void db_callback(AvahiDomainBrowser *b, AvahiIfIndex iface, AvahiProtocol protocol, AvahiBrowserEvent event, const gchar *domain, gpointer userdata) { avahi_log_debug("DB: (%i.%i) <%s> [%s]", iface, protocol, domain, event == AVAHI_BROWSER_NEW ? "new" : "remove"); } -static void stb_callback(AvahiServiceTypeBrowser *b, gint iface, guchar protocol, AvahiBrowserEvent event, const gchar *service_type, const gchar *domain, gpointer userdata) { +static void stb_callback(AvahiServiceTypeBrowser *b, AvahiIfIndex iface, AvahiProtocol protocol, AvahiBrowserEvent event, const gchar *service_type, const gchar *domain, gpointer userdata) { avahi_log_debug("STB: (%i.%i) %s in <%s> [%s]", iface, protocol, service_type, domain, event == AVAHI_BROWSER_NEW ? "new" : "remove"); } -static void sb_callback(AvahiServiceBrowser *b, gint iface, guchar protocol, AvahiBrowserEvent event, const gchar *name, const gchar *service_type, const gchar *domain, gpointer userdata) { +static void sb_callback(AvahiServiceBrowser *b, AvahiIfIndex iface, AvahiProtocol protocol, AvahiBrowserEvent event, const gchar *name, const gchar *service_type, const gchar *domain, gpointer userdata) { avahi_log_debug("SB: (%i.%i) <%s> as %s in <%s> [%s]", iface, protocol, name, service_type, domain, event == AVAHI_BROWSER_NEW ? "new" : "remove"); } -static void sr_callback(AvahiServiceResolver *r, gint iface, guchar protocol, AvahiBrowserEvent event, const gchar *name, const gchar*service_type, const gchar*domain_name, const gchar*hostname, const AvahiAddress *a, guint16 port, AvahiStringList *txt, gpointer userdata) { +static void sr_callback(AvahiServiceResolver *r, AvahiIfIndex iface, AvahiProtocol protocol, AvahiBrowserEvent event, const gchar *name, const gchar*service_type, const gchar*domain_name, const gchar*hostname, const AvahiAddress *a, guint16 port, AvahiStringList *txt, gpointer userdata) { if (event == AVAHI_RESOLVER_TIMEOUT) avahi_log_debug("SR: (%i.%i) <%s> as %s in <%s> [timeout]", iface, protocol, name, service_type, domain_name); @@ -196,7 +196,7 @@ static void sr_callback(AvahiServiceResolver *r, gint iface, guchar protocol, Av } } -static void dsb_callback(AvahiDNSServerBrowser *b, gint iface, guchar protocol, AvahiBrowserEvent event, const gchar*hostname, const AvahiAddress *a, guint16 port, gpointer userdata) { +static void dsb_callback(AvahiDNSServerBrowser *b, AvahiIfIndex iface, AvahiProtocol protocol, AvahiBrowserEvent event, const gchar*hostname, const AvahiAddress *a, guint16 port, gpointer userdata) { gchar t[64]; avahi_address_snprint(t, sizeof(t), a); avahi_log_debug("DSB: (%i.%i): %s/%s:%i [%s]", iface, protocol, hostname, t, port, event == AVAHI_BROWSER_NEW ? "new" : "remove"); -- cgit