Skip to content
Extraits de code Groupes Projets
Valider 821a4b9c rédigé par Samuel de Meester de Ravestein's avatar Samuel de Meester de Ravestein
Parcourir les fichiers

cleaner

parent 898fafa5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -24,10 +24,12 @@
#define OUT_OFF_WINDOW 255
// It is used to identify what kind of pkt was sent lately
#define RANDOM_PKT 0
#define LAST_DATA_PKT 1
#define CLOSING_PKT 2
#define LAST_FEC 3
typedef enum {
RANDOM_PKT = 0,
LAST_DATA_PKT = 1,
CLOSING_PKT = 2,
LAST_FEC = 3
} last_sended_pkt_t;
/**
......@@ -42,9 +44,9 @@ typedef struct state {
uint8_t tail; // place oldest element insert in the buffer | the start and end of the sender window (of the sended pkt)
uint8_t next_seqnum;
uint8_t map_seqnum_to_buffer_place[SEQNUM_RANGE]; // Default value is: OUT_OFF_WINDOW
uint8_t last_pkt_sent; // Can either be: RANDOM_PKT, LAST_DATA_PKT, CLOSING_PKT or LAST_FEC
last_sended_pkt_t last_pkt_sent; // Can either be: RANDOM_PKT, LAST_DATA_PKT, CLOSING_PKT or LAST_FEC
pkt_t *FEC; // The pkt FEC in construction
uint8_t FEC_nbr; // The number of PTYPE_DATA stacked on the FEC
uint8_t FEC_nbr; // The number of PTYPE_DATA stacked on FEC
} sender_state_t;
......
......@@ -47,7 +47,7 @@ cleanup()
trap cleanup SIGINT # Kill the background procces in case of ^-C
# We start the transfer
if ! valgrind --leak-check=full --log-file=${TEST_OUTPUT_FILES}/adv_valgrind_${BSN_PRE}_receiver.log \
if ! valgrind --leak-check=full --log-file=${TEST_OUTPUT_FILES}/adv_valgrind_${BSN_PRE}_sender.log \
./sender -f ${FILENAME} ::1 $port2 2> ${TEST_OUTPUT_FILES}/adv_${BSN_PRE}_sender.log ; then
echo "Crash du sender!"
cat ${TEST_OUTPUT_FILES}/adv_${BSN_PRE}_sender.log
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter