Skip to content

Commit b5bb9c0

Browse files
author
admin-at-452500250982
committed
Proccessing multiple messages at the same time, and add the new so file with less logs printed.
1 parent 84dd789 commit b5bb9c0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

aws_protocol_adaptor/device_client/aws_nvmsgbroker.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,21 +281,22 @@ void nvds_msgapi_do_work(NvDsMsgApiHandle h_ptr)
281281
Work *work_node = (Work *)g_queue_pop_head(work_queue);
282282
AWS_IoT_Client *client = (AWS_IoT_Client *)work_node->h_ptr;
283283
rc = _mqtt_msg_send(client, work_node->topic, work_node->payload, work_node->payload_size);
284-
285-
g_free(work_node);
286284
if (SUCCESS != rc)
287285
{
288286
IOT_ERROR("Unable to publish, error: %d\n", rc);
289287
if (work_node->call_back_handler != NULL)
290288
{
291289
work_node->call_back_handler(work_node->user_ptr, NVDS_MSGAPI_ERR);
292290
}
291+
g_free(work_node);
293292
return;
294293
}
294+
if (work_node->call_back_handler != NULL){
295+
IOT_INFO("Pointer callback.");
296+
work_node->call_back_handler(work_node->user_ptr, NVDS_MSGAPI_OK);
297+
}
298+
g_free(work_node);
295299
}
296300
last_send_time_stamp = current_time_stamp;
297-
// if (work_node->call_back_handler != NULL){
298-
// work_node->call_back_handler(work_node->user_ptr, NVDS_MSGAPI_OK);
299-
// }
300301
return;
301302
}
103 KB
Binary file not shown.

0 commit comments

Comments
 (0)