From 20755e6e29d308d0fe918f513416409dacb1d099 Mon Sep 17 00:00:00 2001 From: Pavel Siska Date: Mon, 2 Sep 2024 14:53:36 +0200 Subject: [PATCH] libtrap - trap_container - fixed typo in functions name --- libtrap/src/ifc_tcpip.c | 8 ++++---- libtrap/src/ifc_tls.c | 8 ++++---- libtrap/src/trap_container.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libtrap/src/ifc_tcpip.c b/libtrap/src/ifc_tcpip.c index 383713c0..b0bcca31 100644 --- a/libtrap/src/ifc_tcpip.c +++ b/libtrap/src/ifc_tcpip.c @@ -1463,7 +1463,7 @@ static void *accept_clients_thread(void *arg) static void finish_container(tcpip_sender_private_t *c, struct trap_mbuf_s *t_mbuf) { - t_cond_write_header(t_mbuf->active, t_mbuf->to_send.head_); + t_cont_write_header(t_mbuf->active, t_mbuf->to_send.head_); uint64_t current_sleep = 1; if ((c->timeout == TRAP_WAIT || (c->timeout == TRAP_HALFWAIT && c->connected_clients)) @@ -1531,7 +1531,7 @@ void tcpip_sender_flush(void *priv) finish_container(c, t_mbuf); c->max_container_id++; struct trap_container_s *t_cont = t_mbuf_get_empty_container(t_mbuf); - t_cond_set_seq_num(t_cont, t_mbuf->processed_messages); + t_cont_set_seq_num(t_cont, t_mbuf->processed_messages); __sync_add_and_fetch(&c->ctx->counter_autoflush[c->ifc_idx], 1); pthread_mutex_unlock(&c->ctx->out_ifc_list[c->ifc_idx].ifc_mtx); @@ -1606,7 +1606,7 @@ int tcpip_sender_send(void *priv, const void *data, uint16_t size, int timeout) finish_container(c, t_mbuf); c->max_container_id++; t_cont = t_mbuf_get_empty_container(t_mbuf); - t_cond_set_seq_num(t_cont, t_mbuf->processed_messages); + t_cont_set_seq_num(t_cont, t_mbuf->processed_messages); t_cont_insert(t_cont, data, size); } @@ -1615,7 +1615,7 @@ int tcpip_sender_send(void *priv, const void *data, uint16_t size, int timeout) finish_container(c, t_mbuf); c->max_container_id++; t_cont = t_mbuf_get_empty_container(t_mbuf); - t_cond_set_seq_num(t_cont, t_mbuf->processed_messages); + t_cont_set_seq_num(t_cont, t_mbuf->processed_messages); } t_mbuf->processed_messages++; diff --git a/libtrap/src/ifc_tls.c b/libtrap/src/ifc_tls.c index a9f392b1..a3e9c99f 100644 --- a/libtrap/src/ifc_tls.c +++ b/libtrap/src/ifc_tls.c @@ -1230,7 +1230,7 @@ static inline uint64_t get_cur_timestamp() static void finish_container(tls_sender_private_t *c, struct trap_mbuf_s *t_mbuf) { - t_cond_write_header(t_mbuf->active, t_mbuf->to_send.head_); + t_cont_write_header(t_mbuf->active, t_mbuf->to_send.head_); uint64_t current_sleep = 1; if ((c->timeout == TRAP_WAIT || (c->timeout == TRAP_HALFWAIT && c->connected_clients)) @@ -1632,7 +1632,7 @@ void tls_sender_flush(void *priv) finish_container(c, t_mbuf); c->max_container_id++; struct trap_container_s *t_cont = t_mbuf_get_empty_container(t_mbuf); - t_cond_set_seq_num(t_cont, t_mbuf->processed_messages); + t_cont_set_seq_num(t_cont, t_mbuf->processed_messages); __sync_add_and_fetch(&c->ctx->counter_autoflush[c->ifc_idx], 1); 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) finish_container(c, t_mbuf); c->max_container_id++; t_cont = t_mbuf_get_empty_container(t_mbuf); - t_cond_set_seq_num(t_cont, t_mbuf->processed_messages); + t_cont_set_seq_num(t_cont, t_mbuf->processed_messages); t_cont_insert(t_cont, data, size); } @@ -1716,7 +1716,7 @@ int tls_sender_send(void *priv, const void *data, uint16_t size, int timeout) finish_container(c, t_mbuf); c->max_container_id++; t_cont = t_mbuf_get_empty_container(t_mbuf); - t_cond_set_seq_num(t_cont, t_mbuf->processed_messages); + t_cont_set_seq_num(t_cont, t_mbuf->processed_messages); } t_mbuf->processed_messages++; diff --git a/libtrap/src/trap_container.h b/libtrap/src/trap_container.h index 6f33db26..cd36f4ce 100644 --- a/libtrap/src/trap_container.h +++ b/libtrap/src/trap_container.h @@ -195,7 +195,7 @@ t_cont_has_space(struct trap_container_s* t_cont, size_t size) * @param value Sequence number. */ static inline void -t_cond_set_seq_num(struct trap_container_s* t_cont, uint64_t value) +t_cont_set_seq_num(struct trap_container_s* t_cont, uint64_t value) { t_cont->seq_num = value; } @@ -206,7 +206,7 @@ t_cond_set_seq_num(struct trap_container_s* t_cont, uint64_t value) * @param t_cont Container */ static inline void -t_cond_write_header(struct trap_container_s* t_cont, uint64_t idx) +t_cont_write_header(struct trap_container_s* t_cont, uint64_t idx) { uint32_t* buffer = (uint32_t*)t_cont->buffer; uint64_t* seq = (uint64_t*)&t_cont->buffer[4];