Commit 6f37350d authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

again, correct was actually %zd

parent 990b8530
......@@ -503,7 +503,7 @@ static void * rcvthr_notls_tcp(void * arg)
if ((header[0] != DIAMETER_VERSION) /* defined in <libfreeDiameter.h> */
|| (length > DIAMETER_MSG_SIZE_MAX)) { /* to avoid too big mallocs */
/* The message is suspect */
TRACE_DEBUG(INFO, "Received suspect header [ver: %d, size: %z], assume disconnection", (int)header[0], length);
TRACE_DEBUG(INFO, "Received suspect header [ver: %d, size: %zd], assume disconnection", (int)header[0], length);
goto error; /* Stop the thread, the recipient of the event will cleanup */
}
......@@ -629,7 +629,7 @@ int fd_tls_rcvthr_core(struct cnxctx * conn, gnutls_session_t session)
if ((header[0] != DIAMETER_VERSION) /* defined in <libfreeDiameter.h> */
|| (length > DIAMETER_MSG_SIZE_MAX)) { /* to avoid too big mallocs */
/* The message is suspect */
TRACE_DEBUG(INFO, "Received suspect header [ver: %d, size: %z], assume disconnection", (int)header[0], length);
TRACE_DEBUG(INFO, "Received suspect header [ver: %d, size: %zd], assume disconnection", (int)header[0], length);
goto out;
}
......@@ -894,7 +894,7 @@ static int send_simple(struct cnxctx * conn, unsigned char * buf, size_t len)
{
ssize_t ret;
size_t sent = 0;
TRACE_ENTRY("%p %p %z", conn, buf, len);
TRACE_ENTRY("%p %p %zd", conn, buf, len);
do {
if (conn->cc_tls) {
CHECK_GNUTLS_DO( ret = gnutls_record_send (conn->cc_tls_para.session, buf + sent, len - sent), return ENOTCONN );
......@@ -909,11 +909,11 @@ static int send_simple(struct cnxctx * conn, unsigned char * buf, size_t len)
/* Send a message -- this is synchronous -- and we assume it's never called by several threads at the same time, so we don't protect. */
int fd_cnx_send(struct cnxctx * conn, unsigned char * buf, size_t len)
{
TRACE_ENTRY("%p %p %z", conn, buf, len);
TRACE_ENTRY("%p %p %zd", conn, buf, len);
CHECK_PARAMS(conn && (conn->cc_socket > 0) && buf && len);
TRACE_DEBUG(FULL, "Sending %zb %sdata on connection %s", len, conn->cc_tls ? "TLS-protected ":"", conn->cc_id);
TRACE_DEBUG(FULL, "Sending %zdb %sdata on connection %s", len, conn->cc_tls ? "TLS-protected ":"", conn->cc_id);
switch (conn->cc_proto) {
case IPPROTO_TCP:
......
......@@ -163,7 +163,7 @@ static void * p_psm_th( void * arg )
psm_loop:
/* Get next event */
CHECK_FCT_DO( fd_event_timedget(peer->p_events, &peer->p_psm_timer, FDEVP_PSM_TIMEOUT, &event, &ev_sz, &ev_data), goto psm_end );
TRACE_DEBUG(FULL, "'%s'\t<-- '%s'\t(%p,%z)\t'%s'",
TRACE_DEBUG(FULL, "'%s'\t<-- '%s'\t(%p,%zd)\t'%s'",
STATE_STR(peer->p_hdr.info.pi_state),
fd_pev_str(event), ev_data, ev_sz,
peer->p_hdr.info.pi_diamid);
......
......@@ -763,7 +763,7 @@ int fd_sctp_get_str_info( int sock, uint16_t *in, uint16_t *out, sSS *primary )
CHECK_SYS( getsockopt(sock, IPPROTO_SCTP, SCTP_STATUS, &status, &sz) );
if (sz != sizeof(status))
{
TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %z", sz, sizeof(status));
TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %zd", sz, sizeof(status));
return ENOTSUP;
}
#ifdef DEBUG_SCTP
......@@ -910,7 +910,7 @@ int fd_sctp_sendstr(int sock, uint16_t strid, uint8_t * buf, size_t len)
} anci;
ssize_t ret;
TRACE_ENTRY("%d %hu %p %z", sock, strid, buf, len);
TRACE_ENTRY("%d %hu %p %zd", sock, strid, buf, len);
memset(&mhdr, 0, sizeof(mhdr));
memset(&iov, 0, sizeof(iov));
......
......@@ -135,7 +135,7 @@ static ssize_t sctps_push(gnutls_transport_ptr_t tr, const void * data, size_t l
{
struct sctps_ctx * ctx = (struct sctps_ctx *) tr;
TRACE_ENTRY("%p %p %z", tr, data, len);
TRACE_ENTRY("%p %p %zd", tr, data, len);
CHECK_PARAMS_DO( tr && data, { errno = EINVAL; return -1; } );
CHECK_FCT_DO( fd_sctp_sendstr(ctx->parent->cc_socket, ctx->strid, (uint8_t *)data, len), /* errno is already set */ return -1 );
......@@ -150,7 +150,7 @@ static ssize_t sctps_pull(gnutls_transport_ptr_t tr, void * buf, size_t len)
size_t pulled = 0;
int emptied;
TRACE_ENTRY("%p %p %z", tr, buf, len);
TRACE_ENTRY("%p %p %zd", tr, buf, len);
CHECK_PARAMS_DO( tr && buf, { errno = EINVAL; return -1; } );
/* If we don't have data available now, pull new message from the fifo -- this is blocking */
......
......@@ -133,7 +133,7 @@ static void * client_sm(void * arg)
/* Receive the first Diameter message on the connection -- cleanup in case of timeout */
CHECK_FCT_DO( fd_cnx_receive(c->conn, &c->ts, &buf, &bufsz), goto cleanup );
TRACE_DEBUG(FULL, "Received %zb from new client '%s'", bufsz, fd_cnx_getid(c->conn));
TRACE_DEBUG(FULL, "Received %zdb from new client '%s'", bufsz, fd_cnx_getid(c->conn));
/* Try parsing this message */
CHECK_FCT_DO( fd_msg_parse_buffer( &buf, bufsz, &msg ), /* Parsing failed */ goto cleanup );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment