indented.
This commit is contained in:
@@ -77,8 +77,9 @@ uint8_t Send_Write_Property_Request_Data(
|
||||
/* encode the NPDU portion of the packet */
|
||||
datalink_get_my_address(&my_address);
|
||||
npdu_encode_npdu_data(&npdu_data, true, MESSAGE_PRIORITY_NORMAL);
|
||||
pdu_len = npdu_encode_pdu(&Handler_Transmit_Buffer[0], &dest,
|
||||
&my_address, &npdu_data);
|
||||
pdu_len =
|
||||
npdu_encode_pdu(&Handler_Transmit_Buffer[0], &dest, &my_address,
|
||||
&npdu_data);
|
||||
/* encode the APDU portion of the packet */
|
||||
data.object_type = object_type;
|
||||
data.object_instance = object_instance;
|
||||
@@ -88,8 +89,9 @@ uint8_t Send_Write_Property_Request_Data(
|
||||
memcpy(&data.application_data[0], &application_data[0],
|
||||
application_data_len);
|
||||
data.priority = priority;
|
||||
len = wp_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
|
||||
invoke_id, &data);
|
||||
len =
|
||||
wp_encode_apdu(&Handler_Transmit_Buffer[pdu_len], invoke_id,
|
||||
&data);
|
||||
pdu_len += len;
|
||||
/* will it fit in the sender?
|
||||
note: if there is a bottleneck router in between
|
||||
@@ -104,15 +106,15 @@ uint8_t Send_Write_Property_Request_Data(
|
||||
&Handler_Transmit_Buffer[0], pdu_len);
|
||||
#if PRINT_ENABLED
|
||||
if (bytes_sent <= 0)
|
||||
fprintf(stderr,
|
||||
"Failed to Send WriteProperty Request (%s)!\n",
|
||||
fprintf(stderr, "Failed to Send WriteProperty Request (%s)!\n",
|
||||
strerror(errno));
|
||||
#endif
|
||||
} else {
|
||||
tsm_free_invoke_id(invoke_id);
|
||||
invoke_id = 0;
|
||||
#if PRINT_ENABLED
|
||||
fprintf(stderr, "Failed to Send WriteProperty Request "
|
||||
fprintf(stderr,
|
||||
"Failed to Send WriteProperty Request "
|
||||
"(exceeds destination maximum APDU)!\n");
|
||||
#endif
|
||||
}
|
||||
@@ -135,8 +137,7 @@ uint8_t Send_Write_Property_Request(
|
||||
|
||||
while (object_value) {
|
||||
#if PRINT_ENABLED_DEBUG
|
||||
fprintf(stderr, "WriteProperty service: "
|
||||
"%s tag=%d\n",
|
||||
fprintf(stderr, "WriteProperty service: " "%s tag=%d\n",
|
||||
(object_value->context_specific ? "context" : "application"),
|
||||
(int) (object_value->context_specific ? object_value->
|
||||
context_tag : object_value->tag));
|
||||
@@ -150,9 +151,7 @@ uint8_t Send_Write_Property_Request(
|
||||
object_value = object_value->next;
|
||||
}
|
||||
|
||||
return Send_Write_Property_Request_Data(device_id,
|
||||
object_type,
|
||||
object_instance,
|
||||
object_property,
|
||||
&application_data[0], apdu_len, priority, array_index);
|
||||
return Send_Write_Property_Request_Data(device_id, object_type,
|
||||
object_instance, object_property, &application_data[0], apdu_len,
|
||||
priority, array_index);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user