* Copyright (C) 1995-2007, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: tcpip.c,v 1.35 2007-10-07 08:53:26 adam Exp $
+ * $Id: tcpip.c,v 1.39 2008-01-16 13:01:45 adam Exp $
*/
/**
* \file tcpip.c
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
#if HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
int written; /* -1 if we aren't writing */
int towrite; /* to verify against user input */
- int (*complete)(const unsigned char *buf, int len); /* length/comple. */
+ int (*complete)(const char *buf, int len); /* length/complete. */
#if HAVE_GETADDRINFO
struct addrinfo *ai;
#else
if (connect_host)
{
tcpip_state *sp = (tcpip_state *) p->cprivate;
- sp->connect_request_buf = xmalloc(strlen(connect_host) + 30);
+ sp->connect_request_buf = (char *) xmalloc(strlen(connect_host) + 30);
sprintf(sp->connect_request_buf, "CONNECT %s HTTP/1.0\r\n\r\n",
connect_host);
sp->connect_request_len = strlen(sp->connect_request_buf);
{
tcpip_state *sp = (tcpip_state *)h->cprivate;
- return sp->altlen && (*sp->complete)((unsigned char *) sp->altbuf,
- sp->altlen);
+ return sp->altlen && (*sp->complete)(sp->altbuf, sp->altlen);
}
/*
state->ssl = SSL_new (state->ctx);
SSL_set_fd (state->ssl, cnew->iofile);
}
+#endif
state->connect_request_buf = 0;
state->connect_response_buf = 0;
-#endif
h = cnew;
}
if (h->state == CS_ST_ACCEPT)
sp->altsize = tmpi;
}
h->io_pending = 0;
- while (!(berlen = (*sp->complete)((unsigned char *)*buf, hasread)))
+ while (!(berlen = (*sp->complete)(*buf, hasread)))
{
if (!*bufsize)
{
sp->altsize = tmpi;
}
h->io_pending = 0;
- while (!(berlen = (*sp->complete)((unsigned char *)*buf, hasread)))
+ while (!(berlen = (*sp->complete)(*buf, hasread)))
{
if (!*bufsize)
{