nss-pam-ldapd commit: r1344 - nss-pam-ldapd/common
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1344 - nss-pam-ldapd/common
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1344 - nss-pam-ldapd/common
- Date: Sun, 26 Dec 2010 16:00:36 +0100 (CET)
Author: arthur
Date: Sun Dec 26 16:00:36 2010
New Revision: 1344
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1344
Log:
return connection reset when connection was closed by the other end
Modified:
nss-pam-ldapd/common/tio.c
Modified: nss-pam-ldapd/common/tio.c
==============================================================================
--- nss-pam-ldapd/common/tio.c Sun Dec 26 15:56:59 2010 (r1343)
+++ nss-pam-ldapd/common/tio.c Sun Dec 26 16:00:36 2010 (r1344)
@@ -295,7 +295,12 @@
/* read the input in the buffer */
rv=read(fp->fd,fp->readbuffer.buffer+fp->readbuffer.start,fp->readbuffer.size-fp->readbuffer.start);
/* check for errors */
- if ((rv==0)||((rv<0)&&(errno!=EINTR)&&(errno!=EAGAIN)))
+ if (rv==0)
+ {
+ errno=ECONNRESET;
+ return -1;
+ }
+ else if ((rv<0)&&(errno!=EINTR)&&(errno!=EAGAIN))
return -1; /* something went wrong with the read */
/* skip the read part in the buffer */
fp->readbuffer.len=rv;
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits
- nss-pam-ldapd commit: r1344 - nss-pam-ldapd/common,
Commits of the nss-pam-ldapd project