nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inc and non-compliant long lines redux


From: Ken Hornstein
Subject: Re: inc and non-compliant long lines redux
Date: Mon, 21 Nov 2022 21:41:34 -0500

>I have a  working prototype that I'm testing that  uses netsec_read(). I
>had  to expand  the function  declaration for  netsec_read() because  it
>didn't return the number of bytes  that the caller received. Not sure if
>that was intentional and I'm just misunderstanding netsec_read().

Oof, how embarassing.  netsec_read() is supposed to RETURN the number
of bytes read, just like read() does (that's why it's return value
is prototyped ssize_t).  But it just returns OK on success.  And we
never had code that used it, so I never noticed (but the documentation
in netsec.h does say what it is SUPPOSED to return).  Also, "buffer"
should probably be unsigned char *.

--Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]