@@ -26,7 +26,7 @@ static char *umts_queue_log_prefix;
2626STAILQ_HEAD (umts_work_q , umts_queue_item ) umts_work_q ;
2727
2828struct umts_queue_item_t * umts_first_queueitem () {
29- return STAILQ_FIRST (& umts_work_q );
29+ return ( struct umts_queue_item_t * ) STAILQ_FIRST (& umts_work_q );
3030}
3131
3232
@@ -38,13 +38,14 @@ void umts_insert_tail(umts_queue_item_t *new_item) {
3838}
3939
4040rob_ret_val_t umts_safe_add_work_queue (umts_queue_item_t * new_item ) {
41- return safe_add_work_queue (& umts_queue_context , new_item );
41+ return safe_add_work_queue (& umts_queue_context , new_item , false );
4242}
4343void umts_cleanup_queue_task (umts_queue_item_t * queue_item ) {
4444 if (queue_item != NULL )
4545 {
46- robusto_message_free (queue_item -> topic );
47- robusto_message_free (queue_item -> data );
46+ robusto_free (queue_item -> topic );
47+ robusto_free (queue_item -> data );
48+ robusto_free (queue_item -> state );
4849 robusto_free (queue_item );
4950 }
5051 cleanup_queue_task (& umts_queue_context );
@@ -65,9 +66,9 @@ rob_ret_val_t umts_init_queue(work_callback work_cb, char *_log_prefix)
6566 // Initialize the work queue
6667 STAILQ_INIT (& umts_work_q );
6768
68- umts_queue_context .first_queue_item_cb = & umts_first_queueitem ;
69- umts_queue_context .remove_first_queueitem_cb = & umts_remove_first_queue_item ;
70- umts_queue_context .insert_tail_cb = & umts_insert_tail ;
69+ umts_queue_context .first_queue_item_cb = ( first_queueitem * ) & umts_first_queueitem ;
70+ umts_queue_context .remove_first_queueitem_cb = ( remove_first_queueitem * ) & umts_remove_first_queue_item ;
71+ umts_queue_context .insert_tail_cb = ( insert_queue_item * ) & umts_insert_tail ;
7172 umts_queue_context .insert_head_cb = NULL ;
7273 umts_queue_context .on_work_cb = work_cb ;
7374 umts_queue_context .max_task_count = 1 ;
0 commit comments