]> git.meshlink.io Git - catta/blobdiff - examples/client-publish-service.c
add support for service subtypes: avahi_server_add_service_subtype()
[catta] / examples / client-publish-service.c
index 9b12f5c73636b3055654807804a5b03d622069c0..c3f11added056dba099252a141b9055ad93fa3e2 100644 (file)
@@ -83,13 +83,13 @@ static void create_services(AvahiClient *c) {
     snprintf(r, sizeof(r), "random=%i", rand());
 
     /* Add the service for IPP */
-    if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, name, "_ipp._tcp", NULL, NULL, 651, "test=blah", r, NULL)) < 0) {
+    if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_ipp._tcp", NULL, NULL, 651, "test=blah", r, NULL)) < 0) {
         fprintf(stderr, "Failed to add _ipp._tcp service: %s\n", avahi_strerror(ret));
         goto fail;
     }
 
     /* Add the same service for BSD LPR */
-    if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, name, "_printer._tcp", NULL, NULL, 515, NULL)) < 0) {
+    if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_printer._tcp", NULL, NULL, 515, NULL)) < 0) {
         fprintf(stderr, "Failed to add _printer._tcp service: %s\n", avahi_strerror(ret));
         goto fail;
     }