- if (avahi_server_add_service(s, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, name, "_ipp._tcp", NULL, NULL, 651, "test=blah", r, NULL) < 0) {
- g_message("Failed to add _ipp._tcp service.");
- g_main_loop_quit(main_loop);
- return;
+ if ((ret = avahi_server_add_service(s, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, name, "_ipp._tcp", NULL, NULL, 651, "test=blah", r, NULL)) < 0) {
+ g_message("Failed to add _ipp._tcp service: %s", avahi_strerror(ret));
+ goto fail;