Re: [PATCH 01/26] pkt-line: introduce packet_read_with_status

2018-01-09 Thread Brandon Williams
On 01/09, Jonathan Tan wrote: > On Tue, 2 Jan 2018 16:18:03 -0800 > Brandon Williams wrote: > > > -int packet_read(int fd, char **src_buf, size_t *src_len, > > - char *buffer, unsigned size, int options) > > +enum packet_read_status packet_read_with_status(int fd,

Re: [PATCH 01/26] pkt-line: introduce packet_read_with_status

2018-01-09 Thread Jonathan Tan
On Tue, 2 Jan 2018 16:18:03 -0800 Brandon Williams wrote: > -int packet_read(int fd, char **src_buf, size_t *src_len, > - char *buffer, unsigned size, int options) > +enum packet_read_status packet_read_with_status(int fd, char **src_buffer, > size_t *src_len, >

Re: [PATCH 01/26] pkt-line: introduce packet_read_with_status

2018-01-05 Thread Brandon Williams
On 01/03, Stefan Beller wrote: > On Tue, Jan 2, 2018 at 4:18 PM, Brandon Williams wrote: > > The current pkt-line API encodes the status of a pkt-line read in the > > length of the read content. An error is indicated with '-1', a flush > > with '0' (which can be confusing

Re: [PATCH 01/26] pkt-line: introduce packet_read_with_status

2018-01-03 Thread Stefan Beller
On Tue, Jan 2, 2018 at 4:18 PM, Brandon Williams wrote: > The current pkt-line API encodes the status of a pkt-line read in the > length of the read content. An error is indicated with '-1', a flush > with '0' (which can be confusing since a return value of '0' can also >

[PATCH 01/26] pkt-line: introduce packet_read_with_status

2018-01-02 Thread Brandon Williams
The current pkt-line API encodes the status of a pkt-line read in the length of the read content. An error is indicated with '-1', a flush with '0' (which can be confusing since a return value of '0' can also indicate an empty pkt-line), and a positive integer for the length of the read content