@@ -47,7 +47,7 @@ CborError CBOREncoder::encode(PropertyContainer & property_container, uint8_t *
47
47
CborError error = CborNoError;
48
48
int num_encoded_properties = 0 ;
49
49
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 ;
51
51
52
52
if (current_property_index >= property_container.size ())
53
53
current_property_index = 0 ;
@@ -59,7 +59,7 @@ CborError CBOREncoder::encode(PropertyContainer & property_container, uint8_t *
59
59
property_container.end (),
60
60
[lightPayload, &arrayEncoder, &error, &num_encoded_properties, &num_checked_properties](Property * p)
61
61
{
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 )))
63
63
{
64
64
if (p->shouldBeUpdated () && p->isReadableByCloud ())
65
65
{
@@ -88,8 +88,8 @@ CborError CBOREncoder::encode(PropertyContainer & property_container, uint8_t *
88
88
return error;
89
89
}
90
90
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 ;
93
93
94
94
/* 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 */
95
95
iter = property_container.begin ();
0 commit comments