Skip to content

Commit

Permalink
Added padding to GPC payload
Browse files Browse the repository at this point in the history
  • Loading branch information
kamelfakihh committed Aug 13, 2024
1 parent 622f31b commit c96f77d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/hello-world/hello-world-talker.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ static int prepare_acf_packet(uint8_t* acf_pdu, uint64_t gpc_code,
Avtp_Gpc_SetField(pdu, AVTP_GPC_FIELD_GPC_MSG_ID, gpc_code);
Avtp_Gpc_SetField(pdu, AVTP_GPC_FIELD_ACF_MSG_LENGTH, acf_length);
memcpy(acf_pdu+AVTP_GPC_HEADER_LEN, payload, length);
memset(acf_pdu+AVTP_GPC_HEADER_LEN+length, 0, acf_length*4 - length);

return AVTP_GPC_HEADER_LEN + length;
return acf_length*4;
}

static int update_cf_length(uint8_t* cf_pdu, uint64_t length)
Expand Down

0 comments on commit c96f77d

Please sign in to comment.