From a97605e07ad7f44f2f65e15be64880e61a39ab43 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 25 Jun 2010 01:08:29 +0200 Subject: from now on we enforce a strict whitespace regime --- avahi-client/client-test.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'avahi-client/client-test.c') diff --git a/avahi-client/client-test.c b/avahi-client/client-test.c index 7d30651..32e1487 100644 --- a/avahi-client/client-test.c +++ b/avahi-client/client-test.c @@ -2,17 +2,17 @@ /*** This file is part of avahi. - + avahi is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + avahi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with avahi; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 @@ -58,7 +58,7 @@ static void avahi_domain_browser_callback( const char *domain, AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, void *userdata) { - + printf ("DOMAIN-BROWSER: Callback on %p, interface (%d), protocol (%d), event (%d), domain (%s), data (%s)\n", (void*) b, interface, protocol, event, domain ? domain : "NULL", (char*)userdata); } @@ -76,7 +76,7 @@ static void avahi_service_resolver_callback( AvahiStringList *txt, AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, void *userdata) { - + char addr[64]; char *txtr; if (event == AVAHI_RESOLVER_FAILURE) { @@ -99,7 +99,7 @@ static void avahi_service_browser_callback ( const char *domain, AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, void *userdata) { - + AvahiServiceResolver *sr; printf ("SERVICE-BROWSER: Callback on %p, interface (%d), protocol (%d), event (%d), name (%s), type (%s), domain (%s), data (%s)\n", (void*) b, interface, protocol, event, name ? name : "NULL", type, domain ? domain : "NULL", (char*)userdata); @@ -120,7 +120,7 @@ static void avahi_service_type_browser_callback ( const char *domain, AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, void *userdata) { - + printf ("SERVICE-TYPE-BROWSER: Callback on %p, interface (%d), protocol (%d), event (%d), type (%s), domain (%s), data (%s)\n", (void*) b, interface, protocol, event, type ? type : "NULL", domain ? domain : "NULL", (char*)userdata); } @@ -133,7 +133,7 @@ static void avahi_address_resolver_callback ( const char *name, AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, void *userdata) { - + char addr[64]; if (event == AVAHI_RESOLVER_FAILURE) { printf ("ADDRESS-RESOLVER: Callback on AddressResolver, timed out.\n"); @@ -152,11 +152,11 @@ static void avahi_host_name_resolver_callback ( const AvahiAddress *a, AVAHI_GCC_UNUSED AvahiLookupResultFlags flags, void *userdata) { - + AvahiClient *client; AvahiAddressResolver *ar; char addr[64]; - + if (event == AVAHI_RESOLVER_FAILURE) { printf ("HOST-NAME-RESOLVER: Callback on HostNameResolver, timed out.\n"); return; @@ -227,7 +227,7 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { simple_poll = avahi_simple_poll_new(); poll_api = avahi_simple_poll_get(simple_poll); - + if (!(avahi = avahi_client_new(poll_api, 0, avahi_client_callback, "omghai2u", &error))) { fprintf(stderr, "Client failed: %s\n", avahi_strerror(error)); goto fail; @@ -246,7 +246,7 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { ret = avahi_client_get_host_name_fqdn (avahi); printf("FQDN: %s (Error Return: %s)\n", ret, ret ? "OK" : avahi_strerror(avahi_client_errno(avahi))); - + cookie = avahi_client_get_local_service_cookie(avahi); printf("Local service cookie: %u (Error Return: %s)\n", cookie, cookie != AVAHI_SERVICE_COOKIE_INVALID ? "OK" : avahi_strerror(avahi_client_errno(avahi))); @@ -254,7 +254,7 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { printf("Creating entry group: %s\n", group ? "OK" : avahi_strerror(avahi_client_errno (avahi))); assert(group); - + printf("Sucessfully created entry group %p\n", (void*) group); printf("%s\n", avahi_strerror(avahi_entry_group_add_service (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar", NULL))); @@ -263,7 +263,7 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { avahi_entry_group_commit (group); domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, "omghai3u"); - + if (domain == NULL) printf ("Failed to create domain browser object\n"); else @@ -317,7 +317,7 @@ int main (AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { avahi_simple_poll_loop(simple_poll); printf("terminating...\n"); - + fail: if (avahi) -- cgit