All pastes #244961 Raw Edit

Prosd

public text v1 · immutable
#244961 ·published 2006-11-10 12:57 UTC
rendered paste body
--- main_copy.cpp       2006-11-10 13:52:23.000000000 +0100
+++ main.cpp    2006-11-10 13:54:24.000000000 +0100
@@ -63,7 +63,7 @@
      AVAHI_GCC_UNUSED AvahiLookupResultFlags flags,
      void* userdata) {
      
-     AvahiClient *c = userdata;
+     AvahiClient *c = (AvahiClient*)userdata;
      assert(b);
  
      /* Called whenever a new services becomes available on the LAN or is removed from the LAN */
@@ -83,7 +83,7 @@
                 the callback function is called the server will free
                 the resolver for us. */
 
-            if (!(avahi_service_resolver_new(c, interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, 0, resolve_callback, c)))
+            if (!(avahi_service_resolver_new(c, interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, (AvahiLookupFlags)0, resolve_callback, c)))
                fprintf(stderr, "Failed to resolve service '%s': %s\n", name, avahi_strerror(avahi_client_errno(c)));
             
              break;
@@ -123,7 +123,7 @@
        }
  
        /* Allocate a new client */
-       client = avahi_client_new(avahi_simple_poll_get(simple_poll), 0, client_callback, NULL, &error);
+       client = avahi_client_new(avahi_simple_poll_get(simple_poll), (AvahiClientFlags)0, client_callback, NULL, &error);
 
        /* Check wether creating the client object succeeded */
        if (!client) {
@@ -131,7 +131,7 @@
        }
    
        /* Create the service browser */
-       if (!(sb = avahi_service_browser_new(client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_http._tcp", NULL, 0, browse_callback, client))) {
+       if (!(sb = avahi_service_browser_new(client, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_http._tcp", NULL, (AvahiLookupFlags)0, browse_callback, client))) {
                fprintf(stderr, "Failed to create service browser: %s\n", avahi_strerror(avahi_client_errno(client)));
        }