X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftcpip.c;h=9ad48bcf7f66ecdfe3d7c47dc45d789076b206f3;hb=03dccce903176e61f889b1558834aa5a09f9f8c0;hp=c3a4b054bcdafc43f8399a41d2e04017cffd0cc6;hpb=ec603701ef51f85beef83898aa36e385028692f1;p=yaz-moved-to-github.git diff --git a/src/tcpip.c b/src/tcpip.c index c3a4b05..9ad48bc 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2011 Index Data + * Copyright (C) 1995-2012 Index Data * See the file LICENSE for details. */ /** @@ -434,7 +434,12 @@ void *tcpip_straddr(COMSTACK h, const char *str) const char *port = "210"; struct addrinfo *ai = 0; if (h->protocol == PROTO_HTTP) - port = "80"; + { + if (h->type == ssl_type) + port = "443"; + else + port = "80"; + } if (!tcpip_init()) return 0; @@ -466,7 +471,12 @@ void *tcpip_straddr(COMSTACK h, const char *str) tcpip_state *sp = (tcpip_state *)h->cprivate; int port = 210; if (h->protocol == PROTO_HTTP) - port = 80; + { + if (h->type == ssl_type) + port = 443; + else + port = 80; + } if (!tcpip_init()) return 0;