(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
This commit is contained in:
Assar Westerlund
2001-07-19 16:57:15 +00:00
parent 6b9775e915
commit 0f1b7c5a0e

View File

@@ -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;