if (host && !avahi_is_valid_domain_name(host))
return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME);
- if (port == 0)
- return avahi_server_set_errno(s, AVAHI_ERR_INVALID_PORT);
-
escape_service_name(ename, sizeof(ename), name);
if (!domain)
assert(type == AVAHI_DNS_SERVER_UPDATE || type == AVAHI_DNS_SERVER_RESOLVE);
assert(address->family == AVAHI_PROTO_INET || address->family == AVAHI_PROTO_INET6);
- if (domain && !avahi_is_valid_domain_name(domain))
- return avahi_server_set_errno(s, AVAHI_ERR_INVALID_DOMAIN_NAME);
-
if (port == 0)
return avahi_server_set_errno(s, AVAHI_ERR_INVALID_PORT);
+ if (domain && !avahi_is_valid_domain_name(domain))
+ return avahi_server_set_errno(s, AVAHI_ERR_INVALID_DOMAIN_NAME);
+
if (address->family == AVAHI_PROTO_INET) {
hexstring(n+3, sizeof(n)-3, &address->data, 4);
r = avahi_record_new_full(n, AVAHI_DNS_CLASS_IN, AVAHI_DNS_TYPE_A, AVAHI_DEFAULT_TTL_HOST_NAME);
case XML_TAG_SERVICE:
- if (u->service->port == 0 || !u->service->type) {
+ if (!u->service->type) {
avahi_log_error("%s: parse failure: service incomplete.", u->group->filename);
u->failed = TRUE;
return;
p = u->buf ? atoi(u->buf) : 0;
- if (p <= 0 || p > 0xFFFF) {
+ if (p < 0 || p > 0xFFFF) {
avahi_log_error("%s: parse failure: invalid port specification \"%s\".", u->group->filename, u->buf);
u->failed = TRUE;
return;
todo:
-* drop glib from avahi-daemon
-* allow srv port == 0
* deal with no local interface ?
+* doxygen updates
* release!
later:
+* drop glib from avahi-daemon
* support for special domain PTR records based on local IP subnet address
* Changes resulting in updated RFC of 7th June 2005:
* Defer responses to replies with TC bit set by 400-500msec
* add entry_group::reset()
* add internal error codes
* finish DBUS stuff: allow NUL bytes in TXT records
+* allow srv port == 0