Ignore ReinitializeDevice and DeviceCommunicationControl service password (#518)

* Fix device object ReinitializeDevice service handling examples of no-password in the device. Add unit testing of device object ReinitializeDevice service.  Add API for setting ReinitializeDevice device object password.

* Fix DeviceCommunicationControl service handling example of no-password in the device.

---------

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2023-10-18 21:32:44 -05:00
committed by GitHub
parent e143066b29
commit 0b5474d36e
12 changed files with 576 additions and 173 deletions
+2 -2
View File
@@ -173,8 +173,8 @@ void handler_device_communication_control(uint8_t *service_request,
if (len > 0)
goto DCC_ABORT;
#endif
if (characterstring_ansi_same(&password, My_Password)) {
if ((My_Password[0] == '\0') ||
characterstring_ansi_same(&password, My_Password)) {
len = encode_simple_ack(&Handler_Transmit_Buffer[pdu_len],
service_data->invoke_id,
SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL);