data->state.os_errno = error;
infof(data, "Connection failed\n");
if(trynextip(conn, sockindex, connected)) {
- failf(data, "Failed connect to %s:%d; %s",
+ failf(data, "Failed connect to %s:%ld; %s",
conn->host.name, conn->port, Curl_strerror(conn, error));
code = CURLE_COULDNT_CONNECT;
}
if(trynextip(conn, sockindex, connected)) {
error = SOCKERRNO;
data->state.os_errno = error;
- failf(data, "Failed connect to %s:%d; %s",
+ failf(data, "Failed connect to %s:%ld; %s",
conn->host.name, conn->port, Curl_strerror(conn, error));
code = CURLE_COULDNT_CONNECT;
}
if(c->running)
/* Only show this when NOT reading the cookies from a file */
- infof(data, "%s cookie %s=\"%s\" for domain %s, path %s, expire %d\n",
+ infof(data, "%s cookie %s=\"%s\" for domain %s, path %s, "
+ "expire %" FORMAT_OFF_T "\n",
replace_old?"Replaced":"Added", co->name, co->value,
co->domain, co->path, co->expires);
/* Handle the case when the pipe breaks, i.e., the connection
we're using gets cleaned up and we're left with nothing. */
if(easy->easy_handle->state.pipe_broke) {
- infof(easy->easy_handle, "Pipe broke: handle 0x%x, url = %s\n",
+ infof(easy->easy_handle, "Pipe broke: handle 0x%p, url = %s\n",
easy, easy->easy_handle->state.path);
if(easy->state != CURLM_STATE_COMPLETED) {
case CURLM_STATE_WAITDO:
/* Wait for our turn to DO when we're pipelining requests */
#ifdef DEBUGBUILD
- infof(easy->easy_handle, "Conn %d send pipe %d inuse %d athead %d\n",
+ infof(easy->easy_handle, "Conn %ld send pipe %d inuse %d athead %d\n",
easy->easy_conn->connectindex,
easy->easy_conn->send_pipe->size,
easy->easy_conn->writechannel_inuse,
}
#ifdef DEBUGBUILD
else {
- infof(easy->easy_handle, "Conn %d recv pipe %d inuse %d athead %d\n",
+ infof(easy->easy_handle, "Conn %ld recv pipe %d inuse %d athead %d\n",
easy->easy_conn->connectindex,
easy->easy_conn->recv_pipe->size,
easy->easy_conn->readchannel_inuse,
result =
Curl_add_bufferf(req_buffer,
"%s %s RTSP/1.0\r\n" /* Request Stream-URI RTSP/1.0 */
- "CSeq: %d\r\n", /* CSeq */
+ "CSeq: %ld\r\n", /* CSeq */
(p_request ? p_request : ""), p_stream_uri,
rtsp->CSeq_sent);
if(result)
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2010, 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
/* we have been this slow for long enough, now die */
failf(data,
"Operation too slow. "
- "Less than %d bytes/sec transfered the last %d seconds",
+ "Less than %ld bytes/sec transfered the last %ld seconds",
data->set.low_speed_limit,
data->set.low_speed_time);
return CURLE_OPERATION_TIMEDOUT;
return 0;
}
if (!SSL_CTX_add_client_CA(ctx, sk_X509_value(ca, i))) {
- failf(data, "cannot add certificate to client CA list",
- cert_file);
+ failf(data, "cannot add certificate to client CA list");
EVP_PKEY_free(pri);
X509_free(x509);
return 0;
* the SO_ERROR is also lost.
*/
if(CURLE_SSL_CONNECT_ERROR == rc && errdetail == 0) {
- failf(data, "Unknown SSL protocol error in connection to %s:%d ",
+ failf(data, "Unknown SSL protocol error in connection to %s:%ld ",
conn->host.name, conn->port);
return rc;
}
state->retry_time=1;
infof(state->conn->data,
- "set timeouts for state %d; Total %d, retry %d maxtry %d\n",
- state->state, (state->max_time-state->start_time),
+ "set timeouts for state %d; Total %ld, retry %d maxtry %d\n",
+ state->state, (long)(state->max_time-state->start_time),
state->retry_time, state->retry_max);
/* init RX time */
/* could realloc pkt buffers here, but the spec doesn't call out
* support for the server requesting a bigger blksize than the client
* requests */
- failf(data, "%s (%d)",
+ failf(data, "%s (%ld)",
"server requested blksize larger than allocated", blksize);
return CURLE_TFTP_ILLEGAL;
}
return CURLE_TFTP_ILLEGAL;
}
Curl_pgrsSetDownloadSize(data, tsize);
- infof(data, "%s (%d)\n", "tsize parsed from OACK", tsize);
+ infof(data, "%s (%ld)\n", "tsize parsed from OACK", tsize);
}
}
/* Increment the retry count and fail if over the limit */
state->retries++;
infof(data,
- "Timeout waiting for block %d ACK. Retries = %d\n", state->retries);
+ "Timeout waiting for block %d ACK. Retries = %d\n",
+ state->block+1, state->retries);
if(state->retries > state->retry_max) {
state->error = TFTP_ERR_TIMEOUT;
state->state = TFTP_STATE_FIN;
/* Increment the retry counter and log the timeout */
state->retries++;
infof(data, "Timeout waiting for block %d ACK. "
- " Retries = %d\n", state->retries);
+ " Retries = %d\n", state->block+1, state->retries);
/* Decide if we've had enough */
if(state->retries > state->retry_max) {
state->error = TFTP_ERR_TIMEOUT;
time(¤t);
if(current > state->max_time) {
- DEBUGF(infof(conn->data, "timeout: %d > %d\n",
- current, state->max_time));
+ DEBUGF(infof(conn->data, "timeout: %ld > %ld\n",
+ (long)current, (long)state->max_time));
state->error = TFTP_ERR_TIMEOUT;
state->state = TFTP_STATE_FIN;
return(0);
if(type == FOLLOW_REDIR) {
if((data->set.maxredirs != -1) &&
(data->set.followlocation >= data->set.maxredirs)) {
- failf(data,"Maximum (%d) redirects followed", data->set.maxredirs);
+ failf(data,"Maximum (%ld) redirects followed", data->set.maxredirs);
return CURLE_TOO_MANY_REDIRECTS;
}
if(dead) {
check->data = data;
- infof(data, "Connection #%d seems to be dead!\n", i);
+ infof(data, "Connection #%ld seems to be dead!\n", i);
Curl_disconnect(check); /* disconnect resources */
data->state.connc->connects[i]=NULL; /* nothing here */
/* there was no room available, kill one */
i = ConnectionKillOne(data);
if(-1 != i)
- infof(data, "Connection (#%d) was killed to make room (holds %d)\n",
+ infof(data, "Connection (#%ld) was killed to make room (holds %ld)\n",
i, data->state.connc->num);
else
infof(data, "This connection did not fit in the connection cache\n");
#ifndef CURL_DISABLE_VERBOSE_STRINGS
char *hostname = conn->bits.proxy?conn->proxy.name:conn->host.name;
- infof(data, "About to connect() to %s%s port %d (#%d)\n",
+ infof(data, "About to connect() to %s%s port %ld (#%ld)\n",
conn->bits.proxy?"proxy ":"",
hostname, conn->port, conn->connectindex);
#else
#ifndef CURL_DISABLE_VERBOSE_STRINGS
static void verboseconnect(struct connectdata *conn)
{
- infof(conn->data, "Connected to %s (%s) port %d (#%d)\n",
+ infof(conn->data, "Connected to %s (%s) port %ld (#%ld)\n",
conn->bits.proxy ? conn->proxy.dispname : conn->host.dispname,
conn->ip_addr_str, conn->port, conn->connectindex);
}