From 0f1b7c5a0e9cc45dc765867d1b071a381279c350 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Thu, 19 Jul 2001 16:57:15 +0000 Subject: [PATCH] (srv_find_realm): handle port numbers consistenly in local byte order git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10363 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/krbhst.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/krb5/krbhst.c b/lib/krb5/krbhst.c index d10de96cf..caff463d1 100644 --- a/lib/krb5/krbhst.c +++ b/lib/krb5/krbhst.c @@ -73,9 +73,9 @@ srv_find_realm(krb5_context context, krb5_krbhst_info ***res, int *count, } if(proto_num == KRB5_KRBHST_HTTP) - def_port = krb5_getportbyname (context, "http", "tcp", 80); + def_port = ntohs(krb5_getportbyname (context, "http", "tcp", 80)); else if(port == 0) - def_port = krb5_getportbyname (context, service, proto, 88); + def_port = ntohs(krb5_getportbyname (context, service, proto, 88)); else def_port = port; @@ -116,9 +116,9 @@ srv_find_realm(krb5_context context, krb5_krbhst_info ***res, int *count, hi->proto = proto_num; - hi->def_port = ntohs(def_port); + hi->def_port = def_port; if (port != 0) - hi->port = ntohs(port); + hi->port = port; else hi->port = rr->u.srv->port;