@@ -1230,7 +1230,7 @@ static inline uint64_t get_cur_timestamp()
12301230static void
12311231finish_container (tls_sender_private_t * c , struct trap_mbuf_s * t_mbuf )
12321232{
1233- t_cond_write_header (t_mbuf -> active , t_mbuf -> to_send .head_ );
1233+ t_cont_write_header (t_mbuf -> active , t_mbuf -> to_send .head_ );
12341234 uint64_t current_sleep = 1 ;
12351235
12361236 if ((c -> timeout == TRAP_WAIT || (c -> timeout == TRAP_HALFWAIT && c -> connected_clients ))
@@ -1303,10 +1303,10 @@ send_blocking_mode(void *arg)
13031303 // is next container ready
13041304 while (!is_next_container_ready (c , cl )) {
13051305 if (c -> is_terminated ) {
1306- break ;
1306+ goto cleanup ;
13071307 }
1308- sleep_time = calculate_sleep (sleep_time );
1309- usleep (sleep_time );
1308+ sleep_time = calculate_sleep (sleep_time );
1309+ usleep (sleep_time );
13101310 }
13111311
13121312 sleep_time = 1 ;
@@ -1632,7 +1632,7 @@ void tls_sender_flush(void *priv)
16321632 finish_container (c , t_mbuf );
16331633 c -> max_container_id ++ ;
16341634 struct trap_container_s * t_cont = t_mbuf_get_empty_container (t_mbuf );
1635- t_cond_set_seq_num (t_cont , t_mbuf -> processed_messages );
1635+ t_cont_set_seq_num (t_cont , t_mbuf -> processed_messages );
16361636
16371637 __sync_add_and_fetch (& c -> ctx -> counter_autoflush [c -> ifc_idx ], 1 );
16381638 pthread_mutex_unlock (& c -> ctx -> out_ifc_list [c -> ifc_idx ].ifc_mtx );
@@ -1707,7 +1707,7 @@ int tls_sender_send(void *priv, const void *data, uint16_t size, int timeout)
17071707 finish_container (c , t_mbuf );
17081708 c -> max_container_id ++ ;
17091709 t_cont = t_mbuf_get_empty_container (t_mbuf );
1710- t_cond_set_seq_num (t_cont , t_mbuf -> processed_messages );
1710+ t_cont_set_seq_num (t_cont , t_mbuf -> processed_messages );
17111711 t_cont_insert (t_cont , data , size );
17121712 }
17131713
@@ -1716,7 +1716,7 @@ int tls_sender_send(void *priv, const void *data, uint16_t size, int timeout)
17161716 finish_container (c , t_mbuf );
17171717 c -> max_container_id ++ ;
17181718 t_cont = t_mbuf_get_empty_container (t_mbuf );
1719- t_cond_set_seq_num (t_cont , t_mbuf -> processed_messages );
1719+ t_cont_set_seq_num (t_cont , t_mbuf -> processed_messages );
17201720 }
17211721
17221722 t_mbuf -> processed_messages ++ ;
0 commit comments