(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:
@@ -73,9 +73,9 @@ srv_find_realm(krb5_context context, krb5_krbhst_info ***res, int *count,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(proto_num == KRB5_KRBHST_HTTP)
|
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)
|
else if(port == 0)
|
||||||
def_port = krb5_getportbyname (context, service, proto, 88);
|
def_port = ntohs(krb5_getportbyname (context, service, proto, 88));
|
||||||
else
|
else
|
||||||
def_port = port;
|
def_port = port;
|
||||||
|
|
||||||
@@ -116,9 +116,9 @@ srv_find_realm(krb5_context context, krb5_krbhst_info ***res, int *count,
|
|||||||
|
|
||||||
hi->proto = proto_num;
|
hi->proto = proto_num;
|
||||||
|
|
||||||
hi->def_port = ntohs(def_port);
|
hi->def_port = def_port;
|
||||||
if (port != 0)
|
if (port != 0)
|
||||||
hi->port = ntohs(port);
|
hi->port = port;
|
||||||
else
|
else
|
||||||
hi->port = rr->u.srv->port;
|
hi->port = rr->u.srv->port;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user