|
|
|
@ -2288,7 +2288,7 @@ int connection_initiate(conn_t *co, const char *host, int port,
|
|
|
|
|
return r;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int connection_create(conn_t *co, int sck)
|
|
|
|
|
int connection_create_fapi(conn_t *co, int sck, struct in_addr *addr)
|
|
|
|
|
{
|
|
|
|
|
int r = 0;
|
|
|
|
|
int bytes = 0;
|
|
|
|
@ -2393,6 +2393,12 @@ int connection_create(conn_t *co, int sck)
|
|
|
|
|
} /* if success we're ready to use established SSL channel */
|
|
|
|
|
|
|
|
|
|
BIO_set_nbio(SSL_get_rbio(co->ssl), 1);
|
|
|
|
|
|
|
|
|
|
/* ok now we need to initialize address */
|
|
|
|
|
if(addr) {
|
|
|
|
|
co->pctx->addr = malloc(sizeof(struct in_addr));
|
|
|
|
|
memcpy(co->pctx->addr, addr, sizeof(struct in_addr));
|
|
|
|
|
} else co->pctx->addr = NULL;
|
|
|
|
|
/*******************************************/
|
|
|
|
|
/*-=Protocol part of connection establish=-*/
|
|
|
|
|
/*******************************************/
|
|
|
|
|