socksreq[6] = 0;
socksreq[7] = 1;
/* If still enough room in buffer, also append hostname */
- hostnamelen = strlen(hostname) + 1; /* length including NUL */
+ hostnamelen = (ssize_t)strlen(hostname) + 1; /* length including NUL */
if (packetsize + hostnamelen <= SOCKS4REQLEN)
strcpy((char*)socksreq + packetsize, hostname);
else
}
if (protocol4a && hostnamelen == 0) {
/* SOCKS4a with very long hostname - send that name separately */
- hostnamelen = strlen(hostname) + 1;
+ hostnamelen = (ssize_t)strlen(hostname) + 1;
code = Curl_write(conn, sock, (char *)hostname, hostnamelen, &written);
if((code != CURLE_OK) || (written != hostnamelen)) {
failf(data, "Failed to send SOCKS4 connect request.");
curl_socket_t sock = conn->sock[sockindex];
struct SessionHandle *data = conn->data;
long timeout;
- bool socks5_resolve_local = data->set.proxytype == CURLPROXY_SOCKS5;
+ bool socks5_resolve_local = (bool)(data->set.proxytype == CURLPROXY_SOCKS5);
const size_t hostname_len = strlen(hostname);
int packetsize = 0;
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
sessionhandle, deal with it */
Curl_reset_reqproto(conn);
- if(!(state = conn->data->state.proto.tftp)) {
+ state = conn->data->state.proto.tftp;
+ if(!state) {
state = conn->data->state.proto.tftp = calloc(sizeof(tftp_state_data_t),
1);
if(!state)
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
else if(nread == CURL_READFUNC_PAUSE) {
struct SingleRequest *k = &data->req;
k->keepon |= KEEP_READ_PAUSE; /* mark reading as paused */
- return 0; /* nothing was read */
+ return CURLE_OK; /* nothing was read */
}
else if((size_t)nread > buffersize)
/* the read function returned a too large value */
}
else {
GetStr(&postdata, p);
- size = strlen(postdata);
+ size = (long)strlen(postdata);
}
if(!postdata) {