Skip to content

Commit

Permalink
[iwm] Return correct error code when there is a status call on non-op…
Browse files Browse the repository at this point in the history
…ened protocol

This was incorrectly returning 1, which is also the OK code and causing fujinet-lib
to tightly loop as it did not think there was an error.
  • Loading branch information
markjfisher committed Sep 29, 2024
1 parent 78e4c01 commit 1b3f533
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/device/iwm/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,14 +500,14 @@ void iwmNetwork::status()
case NetworkData::PROTOCOL:
if (!current_network_data.protocol) {
Debug_printf("ERROR: Calling status on a null protocol.\r\n");
err = true;
s.error = true;
err = NETWORK_ERROR_INVALID_COMMAND;
s.error = NETWORK_ERROR_INVALID_COMMAND;
} else {
err = current_network_data.protocol->status(&s);
}
break;
case NetworkData::JSON:
err = current_network_data.json->status(&s);
err = (current_network_data.json->status(&s) == false) ? 0 : NETWORK_ERROR_GENERAL;
break;
}

Expand Down

0 comments on commit 1b3f533

Please sign in to comment.