diff --git a/src/sender_utils.c b/src/sender_utils.c index db31c725e66f902745039abe801e3f323d30dabc..b70b96b5c9c20d74874c69f39e99978bc04338e0 100644 --- a/src/sender_utils.c +++ b/src/sender_utils.c @@ -72,7 +72,7 @@ int send_pkt(sender_state_t *state, pkt_t *pkt, uint8_t position, int socket_fd) ssize_t sent = send(socket_fd, packet_to_be_sent, len, 0); if (sent == -1) { - ERROR("The sending (using send) of the pkt failed"); + ERROR("The sending (using the function send from <sys/socket.h>) of the pkt failed"); return -1; } @@ -151,6 +151,7 @@ int handle_returning_ack_nack(sender_state_t *state, int socket_fd) state->r_window_size = r_window; uint8_t upper_bound = (place_last_ack + 1) % WINDOW_SIZE; // The oldest seqnum sended + DEBUG("The sender is cumulatively acknowledging [%d : %d[ (place in the buffer)", state->tail, upper_bound); // A do while is necessary here in case we want to make a full revolution (ack from 1 to 1 not included for example) do { @@ -214,7 +215,7 @@ int read_and_send(sender_state_t *state, int sending_fd, int socket_fd) { nbr_byte_read = 0; state->last_pkt_sent = CLOSING_PKT; - DEBUG("The closing pkt has been sent !"); + DEBUG("The CLOSING pkt has been sent !"); } else { @@ -232,7 +233,7 @@ int read_and_send(sender_state_t *state, int sending_fd, int socket_fd) { pkt_set_timestamp(pkt, SECOND_TO_LAST_PKT); state->last_pkt_sent = LAST_DATA_PKT; - DEBUG("The last DATA TYPE is being sent !"); + DEBUG("The LAST DATATYPE is being sent !"); } else {