Skip to content

Commit

Permalink
libtrap - trap_container - fixed typo in functions name
Browse files Browse the repository at this point in the history
  • Loading branch information
SiskaPavel committed Sep 2, 2024
1 parent 5aa86b7 commit 20755e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions libtrap/src/ifc_tcpip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand All @@ -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++;
Expand Down
8 changes: 4 additions & 4 deletions libtrap/src/ifc_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand All @@ -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++;
Expand Down
4 changes: 2 additions & 2 deletions libtrap/src/trap_container.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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];
Expand Down

0 comments on commit 20755e6

Please sign in to comment.