(sock->sd, SOL_SOCKET, SO_RCVBUF, (char *) &size, sizeof(size))
|| setsockopt(sock->sd, SOL_SOCKET, SO_SNDBUF, (char *) &size,
sizeof(size))) {
(sock->sd, SOL_SOCKET, SO_RCVBUF, (char *) &size, sizeof(size))
|| setsockopt(sock->sd, SOL_SOCKET, SO_SNDBUF, (char *) &size,
sizeof(size))) {
sockdata->peer_name, sockdata->peer_port, sock->sd, sockdata->port);
}
sockdata->peer_name, sockdata->peer_port, sock->sd, sockdata->port);
}
(char *) &size, sizeof(size))
|| setsockopt(sock->sd, SOL_SOCKET, SO_SNDBUF,
(char *) &size, sizeof(size))) {
(char *) &size, sizeof(size))
|| setsockopt(sock->sd, SOL_SOCKET, SO_SNDBUF,
(char *) &size, sizeof(size))) {
if (setsockopt(sd, SOL_SOCKET, SO_RCVBUF, (char *) &size, sizeof(size))
|| setsockopt(sd, SOL_SOCKET, SO_SNDBUF, (char *) &size,
sizeof(size)))
if (setsockopt(sd, SOL_SOCKET, SO_RCVBUF, (char *) &size, sizeof(size))
|| setsockopt(sd, SOL_SOCKET, SO_SNDBUF, (char *) &size,
sizeof(size)))
gras_trp_tcp_recv(res, (char *) &hisport, sizeof(hisport));
sockdata->peer_port = ntohl(hisport);
gras_trp_tcp_recv(res, (char *) &hisport, sizeof(hisport));
sockdata->peer_port = ntohl(hisport);
- VERB3("Accepted from %s:%d (sd=%d)", sockdata->peer_name, sockdata->peer_port, sd);
+ XBT_VERB("Accepted from %s:%d (sd=%d)", sockdata->peer_name, sockdata->peer_port, sd);
xbt_dynar_push(((gras_trp_procdata_t)
gras_libdata_by_id(gras_trp_libdata_id))->sockets, &res);
xbt_dynar_push(((gras_trp_procdata_t)
gras_libdata_by_id(gras_trp_libdata_id))->sockets, &res);
- DEBUG3("write(%d, %p, %ld);", sock->sd, data, size);
+ XBT_DEBUG("write(%d, %p, %ld);", sock->sd, data, size);
- DEBUG5("read(%d, %p, %ld) got %d so far (%s)",
+ XBT_DEBUG("read(%d, %p, %ld) 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);
sock->sd, data + got, bufsize, got,
hexa_str((unsigned char *) data, got, 0));
status = tcp_read(sock->sd, data + got, (size_t) bufsize);
sock->sd, data + got, (int) size, gras_socket_peer_name(sock),
gras_socket_peer_port(sock), sock_errstr(sock_errno), got);
}
sock->sd, data + got, (int) size, gras_socket_peer_name(sock),
gras_socket_peer_port(sock), sock_errstr(sock_errno), got);
}
if (data->out == buffering_buf) {
if (XBT_LOG_ISENABLED(gras_trp_tcp, xbt_log_priority_debug))
hexa_print("chunk to send ",
(unsigned char *) data->out_buf.data, data->out_buf.size);
if ((data->out_buf.size - data->out_buf.pos) != 0) {
if (data->out == buffering_buf) {
if (XBT_LOG_ISENABLED(gras_trp_tcp, xbt_log_priority_debug))
hexa_print("chunk to send ",
(unsigned char *) data->out_buf.data, data->out_buf.size);
if ((data->out_buf.size - data->out_buf.pos) != 0) {
gras_socket_peer_name(sock), gras_socket_peer_port(sock));
gras_trp_tcp_send(sock, data->out_buf.data, data->out_buf.size);
gras_socket_peer_name(sock), gras_socket_peer_port(sock));
gras_trp_tcp_send(sock, data->out_buf.data, data->out_buf.size);
writev(sock->sd, xbt_dynar_get_ptr(vect, 0), size);
xbt_dynar_reset(vect);
}
writev(sock->sd, xbt_dynar_get_ptr(vect, 0), size);
xbt_dynar_reset(vect);
}
readv(sock->sd, xbt_dynar_get_ptr(vect, 0), size);
xbt_dynar_reset(vect);
}
readv(sock->sd, xbt_dynar_get_ptr(vect, 0), size);
xbt_dynar_reset(vect);
}
/* size of the chunk to receive in that shot */
long int thissize =
min(size - chunk_pos, data->buffsize - data->out_buf.size);
/* size of the chunk to receive in that shot */
long int thissize =
min(size - chunk_pos, data->buffsize - data->out_buf.size);
(int) data->out_buf.size,
((int) data->out_buf.size) + thissize - 1, size,
hexa_str((unsigned char *) chunk, thissize, 0));
(int) data->out_buf.size,
((int) data->out_buf.size) + thissize - 1, size,
hexa_str((unsigned char *) chunk, thissize, 0));
data->out_buf.size, size - chunk_pos, size,
hexa_str((unsigned char *) chunk, chunk_pos, 0));
data->out_buf.size, size - chunk_pos, size,
hexa_str((unsigned char *) chunk, chunk_pos, 0));
data->in_buf.pos, size - chunk_pos, size,
hexa_str((unsigned char *) chunk, chunk_pos, 0));
}
/* indicate on need to the gras_select function that there is more to read on this socket so that it does not actually select */
sock->moredata = (data->in_buf.size > data->in_buf.pos);
data->in_buf.pos, size - chunk_pos, size,
hexa_str((unsigned char *) chunk, chunk_pos, 0));
}
/* indicate on need to the gras_select function that there is more to read on this socket so that it does not actually select */
sock->moredata = (data->in_buf.size > data->in_buf.pos);
hexa_str((char *) chunk, size, 0));
elm.iov_len = (size_t) size;
hexa_str((char *) chunk, size, 0));
elm.iov_len = (size_t) size;
elm.iov_base = (void *) chunk;
elm.iov_len = (size_t) size;
xbt_dynar_push(sock->bufdata->in_buf_v, &elm);
elm.iov_base = (void *) chunk;
elm.iov_len = (size_t) size;
xbt_dynar_push(sock->bufdata->in_buf_v, &elm);
- WARN3("Socket closed, but %d bytes were unread (size=%d,pos=%d)",
+ XBT_WARN("Socket closed, but %d bytes were unread (size=%d,pos=%d)",
data->in_buf.size - data->in_buf.pos,
data->in_buf.size, data->in_buf.pos);
}
data->in_buf.size - data->in_buf.pos,
data->in_buf.size, data->in_buf.pos);
}
data->in_buf.size, data->out_buf.size);
gras_trp_bufiov_flush(sock);
}
data->in_buf.size, data->out_buf.size);
gras_trp_bufiov_flush(sock);
}