Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed macro error #12502

Merged
merged 2 commits into from
Feb 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions TESTS/network/emac/emac_util.cpp
Original file line number Diff line number Diff line change
@@ -203,7 +203,7 @@ void emac_if_validate_outgoing_msg(void)

if (outgoing_msgs[i].flags & RESPONSE_RECEIVED) {

int failure = outgoing_msgs[i].flags & (INVALID_LENGHT | INVALID_DATA);
int failure = outgoing_msgs[i].flags & (INVALID_LENGTH | INVALID_DATA);

if (failure) {
SET_ERROR_FLAGS(MSG_VALID_ERROR);
@@ -212,7 +212,7 @@ void emac_if_validate_outgoing_msg(void)
if (!(outgoing_msgs[i].flags & PRINTED)) {
if ((trace_level & TRACE_SUCCESS) || ((trace_level & TRACE_FAILURE) && failure)) {
printf("response: receipt number %i %s %s %s\r\n\r\n", outgoing_msgs[i].receipt_number,
outgoing_msgs[i].flags & INVALID_LENGHT ? "LENGTH INVALID" : "LENGTH OK",
outgoing_msgs[i].flags & INVALID_LENGTH ? "LENGTH INVALID" : "LENGTH OK",
outgoing_msgs[i].flags & INVALID_DATA ? "DATA INVALID" : "DATA OK",
outgoing_msgs[i].flags & BROADCAST ? "BROADCAST" : "UNICAST");
outgoing_msgs[i].flags |= PRINTED;
@@ -252,11 +252,11 @@ bool emac_if_update_reply_to_outgoing_msg(int receipt_number, int length, int in
minimum frame length or sent length (in case frame has been converted to be longer than minimum
length does not validate length) */
if (length != ETH_FRAME_MIN_LEN && length != ETH_FRAME_PADD_LEN && outgoing_msgs[outgoing_msg_index].length != length && length < ETH_FRAME_MIN_LEN) {
outgoing_msgs[outgoing_msg_index].flags |= INVALID_LENGHT;
outgoing_msgs[outgoing_msg_index].flags |= INVALID_LENGTH;
}
} else {
if (outgoing_msgs[outgoing_msg_index].length != length) {
outgoing_msgs[outgoing_msg_index].flags |= INVALID_LENGHT;
outgoing_msgs[outgoing_msg_index].flags |= INVALID_LENGTH;
}
}
if (invalid_data_index && invalid_data_index < outgoing_msgs[outgoing_msg_index].length) {
2 changes: 1 addition & 1 deletion TESTS/network/emac/emac_util.h
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ extern const unsigned char eth_mac_broadcast_addr[];
// Message validation flags
#define BROADCAST 0x01
#define RESPONSE_RECEIVED 0x02
#define INVALID_LENGHT 0x04
#define INVALID_LENGTH 0x04
#define INVALID_DATA 0x08
#define PRINTED 0x10
// Validates outgoing messages for replies, sets error flags on error