summaryrefslogtreecommitdiffstats
path: root/contrib/bind/lib/irs/dns_sv.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind/lib/irs/dns_sv.c')
-rw-r--r--contrib/bind/lib/irs/dns_sv.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/contrib/bind/lib/irs/dns_sv.c b/contrib/bind/lib/irs/dns_sv.c
index ea0ba70..e6cb2df 100644
--- a/contrib/bind/lib/irs/dns_sv.c
+++ b/contrib/bind/lib/irs/dns_sv.c
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns_sv.c,v 1.17 1999/09/04 22:06:14 vixie Exp $";
+static const char rcsid[] = "$Id: dns_sv.c,v 1.19 2000/03/30 22:53:56 vixie Exp $";
#endif
/* Imports */
@@ -105,8 +105,8 @@ irs_dns_sv(struct irs_acc *this) {
sv->rewind = sv_rewind;
sv->close = sv_close;
sv->minimize = sv_minimize;
- sv->res_get = sv_res_get;
- sv->res_set = sv_res_set;
+ sv->res_get = NULL; /* sv_res_get; */
+ sv->res_set = NULL; /* sv_res_set; */
return (sv);
}
@@ -150,7 +150,7 @@ sv_byport(struct irs_sv *this, int port, const char *proto) {
char portstr[16];
char **hes_list;
- sprintf(portstr, "%d", port);
+ sprintf(portstr, "%d", ntohs(port));
if (!(hes_list = hesiod_resolve(dns->hes_ctx, portstr, "port")))
return (NULL);
@@ -193,12 +193,13 @@ parse_hes_list(struct irs_sv *this, char **hes_list, const char *proto) {
p++;
if (!*p)
continue;
- proto_len = strlen(proto);
- if (strncasecmp(++p, proto, proto_len) != 0)
- continue;
- if (p[proto_len] && !isspace(p[proto_len]))
- continue;
-
+ if (proto) {
+ proto_len = strlen(proto);
+ if (strncasecmp(++p, proto, proto_len) != 0)
+ continue;
+ if (p[proto_len] && !isspace(p[proto_len]))
+ continue;
+ }
/* OK, we've got a live one. Let's parse it for real. */
if (pvt->svbuf)
free(pvt->svbuf);
OpenPOWER on IntegriCloud