[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: commit: ldap/libraries/liblber io.c
Hallvard B Furuseth wrote:
Howard Chu writes:
Keep the sock_errset() if returning LBER_DEFAULT and sblen< 0?
No. ber_int_sb_read() will cause errno to already be set if it cannot
fulfill the request.
Sorry, I meant sblen>= 0 of course. That can be a read() result which
does not set errno.
No, doesn't matter. A blocking read that returns 0 means of course that the
connection was closed. A non-blocking read that returns 0 will set errno.
Hm. If sblen >0 and <i then we will lose bytes, need to fix that.
And maybe the variable used like i in the changed code must be
ber_slen_t instead of int
Why?
Same type as sblen, used for the full ber buffer size. Haven't looked
closely enough to see if the particular pointer diff can only be a few
bytes or not.
In this section of code, the difference can only be [0-4] bytes.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/