Skip to content

Commit ac5fa79

Browse files
committed
snmp: update peername composition to include target_port
Signed-off-by: k402xxxcenxxx <[email protected]>
1 parent 4ccbd8f commit ac5fa79

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

plugins/in_snmp/in_snmp.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,7 @@ static int in_snmp_init(struct flb_input_instance *in,
379379
snmp_sess_init(&ctx->session);
380380

381381
{
382-
flb_plg_error(ctx->ins, "target_port : %d", ctx->target_port);
383-
384-
/* compose peername by using target_host and port */
382+
/* compose peername by using target_host and target_port */
385383
size_t host_len = strlen(ctx->target_host);
386384
int port_len = snprintf(NULL, 0, "%d", ctx->target_port);
387385
size_t static_len = strlen("udp::"); // "udp:" + ":"
@@ -399,7 +397,6 @@ static int in_snmp_init(struct flb_input_instance *in,
399397
flb_free(ctx);
400398
return -1;
401399
}
402-
flb_plg_error(ctx->ins, "peer : %s", peer);
403400

404401
ctx->session.peername = peer;
405402
}

0 commit comments

Comments
 (0)