@@ -47,7 +47,7 @@ CborError CBOREncoder::encode(PropertyContainer & property_container, uint8_t *
4747 CborError error = CborNoError;
4848 int num_encoded_properties = 0 ;
4949 int num_checked_properties = 0 ;
50- static int encoded_properties_message_limit = - 1 ;
50+ static int encoded_properties_message_limit = CBOR_ENCODER_NO_PROPERTIES_LIMIT ;
5151
5252 if (current_property_index >= property_container.size ())
5353 current_property_index = 0 ;
@@ -59,7 +59,7 @@ CborError CBOREncoder::encode(PropertyContainer & property_container, uint8_t *
5959 property_container.end (),
6060 [lightPayload, &arrayEncoder, &error, &num_encoded_properties, &num_checked_properties](Property * p)
6161 {
62- if ((error == CborNoError) && ((num_encoded_properties < encoded_properties_message_limit) || (encoded_properties_message_limit == - 1 )))
62+ if ((error == CborNoError) && ((num_encoded_properties < encoded_properties_message_limit) || (encoded_properties_message_limit == CBOR_ENCODER_NO_PROPERTIES_LIMIT )))
6363 {
6464 if (p->shouldBeUpdated () && p->isReadableByCloud ())
6565 {
@@ -88,8 +88,8 @@ CborError CBOREncoder::encode(PropertyContainer & property_container, uint8_t *
8888 return error;
8989 }
9090
91- /* Restore property message limit to NO_LIMIT */
92- encoded_properties_message_limit = - 1 ;
91+ /* Restore property message limit to CBOR_ENCODER_NO_PROPERTIES_LIMIT */
92+ encoded_properties_message_limit = CBOR_ENCODER_NO_PROPERTIES_LIMIT ;
9393
9494 /* The append process has been successful, so we don't need to terty to send this properties set. Cleanup _has_been_appended_but_not_sended flag */
9595 iter = property_container.begin ();
0 commit comments