int failed = 0;
- XBT_IN("");
+ XBT_IN();
xbt_socket_new_ext(1, &res, sock->plugin, sock->buf_size, 0);
sd = accept(sock->sd, (struct sockaddr *) &peer_in, &peer_in_len);
int status = 0;
status = tcp_write(sock->sd, data, (size_t) size);
- XBT_DEBUG("write(%d, %p, %ld);", sock->sd, data, size);
+ XBT_DEBUG("write(%d, %p, %lu);", sock->sd, data, size);
if (status < 0) {
#ifdef EWOULDBLOCK
#endif
continue;
- THROWF(system_error, 0, "write(%d,%p,%ld) failed: %s",
+ THROWF(system_error, 0, "write(%d,%p,%lu) failed: %s",
sock->sd, data, size, sock_errstr(sock_errno));
}
while (size > got) {
int status = 0;
- XBT_DEBUG("read(%d, %p, %ld) got %d so far (%s)",
+ XBT_DEBUG("read(%d, %p, %lu) got %d so far (%s)",
sock->sd, data + got, bufsize, got,
hexa_str((unsigned char *) data, got, 0));
status = tcp_read(sock->sd, data + got, (size_t) bufsize);
if (status < 0) {
THROWF(system_error, 0,
- "read(%d,%p,%d) from %s:%d failed: %s; got %d so far",
- sock->sd, data + got, (int) size, xbt_socket_peer_name(sock),
+ "read(%d,%p,%lu) from %s:%d failed: %s; got %d so far",
+ sock->sd, data + got, size, xbt_socket_peer_name(sock),
xbt_socket_peer_port(sock), sock_errstr(sock_errno), got);
}
XBT_DEBUG("Got %d more bytes (%s)", status,
int size;
#endif
xbt_trp_bufdata_t *data = sock->bufdata;
- XBT_IN("");
+ XBT_IN();
XBT_DEBUG("Flush");
if (data->out == buffering_buf) {
xbt_trp_bufdata_t *data = (xbt_trp_bufdata_t *) sock->bufdata;
int chunk_pos = 0;
- XBT_IN("");
+ XBT_IN();
while (chunk_pos < size) {
/* size of the chunk to receive in that shot */
long int thissize =
min(size - chunk_pos, data->buffsize - data->out_buf.size);
- XBT_DEBUG("Set the chars %d..%ld into the buffer; size=%ld, ctn=(%s)",
- (int) data->out_buf.size,
- ((int) data->out_buf.size) + thissize - 1, size,
+ XBT_DEBUG("Set the chars %d..%ld into the buffer; size=%lu, ctn=(%s)",
+ data->out_buf.size,
+ data->out_buf.size + thissize - 1, size,
hexa_str((unsigned char *) chunk, thissize, 0));
memcpy(data->out_buf.data + data->out_buf.size, chunk + chunk_pos,
data->out_buf.size += thissize;
chunk_pos += thissize;
- XBT_DEBUG("New pos = %d; Still to send = %ld of %ld; ctn sofar=(%s)",
+ XBT_DEBUG("New pos = %d; Still to send = %lu of %lu; ctn sofar=(%s)",
data->out_buf.size, size - chunk_pos, size,
hexa_str((unsigned char *) chunk, chunk_pos, 0));
xbt_trp_bufdata_t *data = sock->bufdata;
long int chunk_pos = 0;
- XBT_IN("");
+ XBT_IN();
while (chunk_pos < size) {
/* size of the chunk to receive in that shot */
data->in_buf.pos += thissize;
chunk_pos += thissize;
- XBT_DEBUG("New pos = %d; Still to receive = %ld of %ld. Ctn so far=(%s)",
+ XBT_DEBUG("New pos = %d; Still to receive = %lu of %lu. Ctn so far=(%s)",
data->in_buf.pos, size - chunk_pos, size,
hexa_str((unsigned char *) chunk, chunk_pos, 0));
}