projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Document s=ag
[yaz-moved-to-github.git]
/
src
/
tcpip.c
diff --git
a/src/tcpip.c
b/src/tcpip.c
index
c3a4b05
..
986abc9
100644
(file)
--- a/
src/tcpip.c
+++ b/
src/tcpip.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* 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.
*/
/**
* See the file LICENSE for details.
*/
/**
@@
-204,7
+204,7
@@
COMSTACK tcpip_type(int s, int flags, int protocol, void *vp)
p->f_addrstr = tcpip_addrstr;
p->f_straddr = tcpip_straddr;
p->f_set_blocking = tcpip_set_blocking;
p->f_addrstr = tcpip_addrstr;
p->f_straddr = tcpip_straddr;
p->f_set_blocking = tcpip_set_blocking;
- p->max_recv_bytes = 5000000;
+ p->max_recv_bytes = 128 * 1024 * 1024;
p->state = s < 0 ? CS_ST_UNBND : CS_ST_IDLE; /* state of line */
p->event = CS_NONE;
p->state = s < 0 ? CS_ST_UNBND : CS_ST_IDLE; /* state of line */
p->event = CS_NONE;
@@
-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)
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;
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)
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;
if (!tcpip_init())
return 0;