Skip to content
Extraits de code Groupes Projets
Valider ead59080 rédigé par Vany Ingenzi's avatar Vany Ingenzi
Parcourir les fichiers

Fully working FEC receiver, while implementing FEC I fixed some errors in the packet_interface.c

parent e4338fb8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Fichier supprimé
Fichier supprimé
......@@ -100,7 +100,7 @@ pkt_status_code pkt_decode_data_fec(const char *data, const size_t len, pkt_t *p
@brief : We don't check the checksum and the window here
**/
uint32_t crc2;
if ( type == PTYPE_DATA && (data[0] & TR_MASK ) == 0 && payload_length > 0 )
if ((data[0] & TR_MASK ) == 0 && payload_length > 0 )
{
memcpy((void *) &crc2, &data[12+payload_length], 4);
crc2 = ntohl((uint32_t) crc2);
......
......@@ -309,8 +309,6 @@ int potential_usage_of_fec(receiver_state_t * state, const pkt_t * pkt)
uint16_t missing_data_seqnum = 0;
if ( can_fec_be_used(state, fec_seqnum, &missing_data_seqnum) )
{
DEBUG("Going to use FEC packet with seqnum %d to recover data packet with seqnum %d",
fec_seqnum, missing_data_seqnum);
if ( use_fec(state, pkt, missing_data_seqnum) != 0 ) return -1;
} else
{
......
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