From 2167e0df5ffabd620fad4047cba88176d158f65f Mon Sep 17 00:00:00 2001 From: skarg Date: Thu, 28 Feb 2013 21:39:49 +0000 Subject: [PATCH] Nikola noticed that error reporting for Write-Property-Multiple is different in a sense that WPM sends three more parameters: object_id, property and array index. However, in demo/handlers/h_wpm.c, error reporting is done through bacerror_encode_apdu instead of wpm_error_ack_encode_apdu. Nikola suggests that this should be changed. Thank you, Nikola! --- bacnet-stack/demo/handler/h_wpm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bacnet-stack/demo/handler/h_wpm.c b/bacnet-stack/demo/handler/h_wpm.c index d7c90473..630af1f6 100644 --- a/bacnet-stack/demo/handler/h_wpm.c +++ b/bacnet-stack/demo/handler/h_wpm.c @@ -174,10 +174,10 @@ void handler_write_property_multiple( fprintf(stderr, "WPM: Sending Abort!\n"); #endif } else if (len == BACNET_STATUS_ERROR) { - apdu_len = - bacerror_encode_apdu(&Handler_Transmit_Buffer[npdu_len], - service_data->invoke_id, SERVICE_CONFIRMED_WRITE_PROP_MULTIPLE, - wp_data.error_class, wp_data.error_code); + apdu_len = wpm_error_ack_encode_apdu( + &Handler_Transmit_Buffer[npdu_len], + service_data->invoke_id, + &wp_data); #if PRINT_ENABLED fprintf(stderr, "WPM: Sending Error!\n"); #endif