suit to other c firmat
This commit is contained in:
parent
3bf227271a
commit
cc8eb754f9
|
@ -108,6 +108,7 @@ static int _setup_connect_init_params(MQTTInitParams* initParams)
|
|||
static void mqtt_devmodel_thread(void)
|
||||
{
|
||||
int rc;
|
||||
int i = 0;
|
||||
|
||||
MQTTInitParams init_params = DEFAULT_MQTT_INIT_PARAMS;
|
||||
rc = _setup_connect_init_params(&init_params);
|
||||
|
@ -138,7 +139,7 @@ static void mqtt_devmodel_thread(void)
|
|||
IOT_DM_RegisterCallback(PROPERTY_SET , h_dm, property_set_cb);
|
||||
IOT_DM_Yield(h_dm, 200);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
IOT_DM_Property_Report(h_dm, PROPERTY_POST, i * 2, "{\"volume\": {\"Value\":50}}");
|
||||
IOT_DM_TriggerEvent(h_dm, i * 2 + 1, "low_power_alert", "{\"power\": 5}");
|
||||
|
||||
|
|
|
@ -920,7 +920,8 @@ static int _handle_suback_packet(UIoT_Client *pClient, Timer *timer, QoS qos)
|
|||
|
||||
int flag_dup = 0, i_free = -1;
|
||||
|
||||
for (int j = 0; j < count; j++) {
|
||||
int j;
|
||||
for (j = 0; j < count; j++) {
|
||||
/* In negative case, grantedQoS will be 0xFFFF FF80, which means -128 */
|
||||
if ((uint8_t)grantedQoS[j] == 0x80) {
|
||||
sub_nack = true;
|
||||
|
|
Loading…
Reference in New Issue