On Sat, Jan 20 2018, Rob Pierce <[email protected]> wrote:
> The pid_t confused me, but I believe this is correct - i.e. referring to the
> packet id as oppose to a process id.
>
> Comments?  Ok?

Makes sense, ok.  Would you mind converting the %zd to %zu, while here?

> Index: trap.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/snmpd/trap.c,v
> retrieving revision 1.29
> diff -u -p -r1.29 trap.c
> --- trap.c    21 Apr 2017 13:46:15 -0000      1.29
> +++ trap.c    20 Jan 2018 16:41:25 -0000
> @@ -65,7 +65,6 @@ trap_agentx(struct agentx_handle *h, str
>       int                              ret = AGENTX_ERR_NONE;
>       int                              seensysuptime, seentrapoid;
>       size_t                           len = 0;
> -     pid_t                            pid = -1;
>       char                            *v = NULL;
>  
>       *varcpy = NULL;
> @@ -125,8 +124,8 @@ trap_agentx(struct agentx_handle *h, str
>  
>       if (varbind != NULL)
>               len = ber_calc_len(varbind);
> -     log_debug("trap_agentx: from pid %u len %zd elements %d",
> -         pid, len, x);
> +     log_debug("trap_agentx: from packetid %d len %zd elements %d",
> +         pdu->hdr->packetid, len, x);
>  
>       trap_send(&o, varbind);
>  
>

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to