Lines Matching defs:name
40 static char *name = NULL;
55 fprintf(stderr, "Service '%s' successfully established.\n", name);
61 /* A service name collision happened. Let's pick a new name */
62 n = avahi_alternative_service_name(name);
63 avahi_free(name);
64 name = n;
66 fprintf(stderr, "Service name collision, renaming service to '%s'\n", name);
99 fprintf(stderr, "Adding service '%s'\n", name);
105 if ((ret = avahi_server_add_service(s, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_ipp._tcp", NULL, NULL, 651, "test=blah", r, NULL)) < 0) {
111 if ((ret = avahi_server_add_service(s, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_printer._tcp", NULL, NULL, 515, NULL)) < 0) {
117 if ((ret = avahi_server_add_service_subtype(s, group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, name, "_printer._tcp", NULL, "_magic._sub._printer._tcp") < 0)) {
143 * name on the network, so it's time to create our services */
154 /* A host name collision happened. Let's pick a new name for the server */
156 fprintf(stderr, "Host name collision, retrying with '%s'\n", n);
161 fprintf(stderr, "Failed to set new host name: %s\n", avahi_strerror(r));
175 * again with the new host name. */
209 name = avahi_strdup("MegaPrinter");
211 /* Let's set the host name for this server. */
243 avahi_free(name);