Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
scareything committed Jul 12, 2023
1 parent 00a2779 commit f5c2b04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ziti-tunnel/tunnel_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,12 @@ static err_t on_tcp_client_data(void *io_ctx, struct tcp_pcb *pcb, struct pbuf *
wr_ctx->pbuf = p;
// get all pbufs if this is a chain
if (p->next == NULL) {
TNL_LOG(TRACE, "packet is contained in a single pbuf len=%d client=%s service=%s", len,
io->tnlr_io->client, io->tnlr_io->service_name);
wr_ctx->payload = p->payload;
} else {
TNL_LOG(TRACE, "packet is contained in a pbuf chain len=%d client=%s service=%s", len,
io->tnlr_io->client, io->tnlr_io->service_name);
if ((wr_ctx->payload = malloc(p->tot_len)) == NULL) {
TNL_LOG(ERR, "failed to allocate %z bytes for pbuf chain client=%s service=%s", p->tot_len,
io->tnlr_io->client, io->tnlr_io->service_name);
Expand Down

0 comments on commit f5c2b04

Please sign in to comment.