diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-06-12 11:06:14 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-06-12 11:06:14 +0200 |
commit | afc4d034fdfd798629572003bdb379d1c0e3345e (patch) | |
tree | 418137e995e22fe711b6b200bcfab2e67e24b95c | |
parent | 3269910fa9b1842fa0f53fa634ac5679d0cf7acb (diff) |
fix type of host address and handle errors in writing hostent
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@284 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r-- | nslcd/host.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nslcd/host.c b/nslcd/host.c index ac70c0a..4ebc544 100644 --- a/nslcd/host.c +++ b/nslcd/host.c @@ -191,7 +191,7 @@ _nss_ldap_parse_host (LDAPMessage * e, continue; #else - unsigned long haddr; + in_addr_t haddr; haddr = inet_addr (addresses[i]); #endif @@ -364,7 +364,8 @@ int nslcd_host_all(TFILE *fp) { /* write the result */ WRITE_INT32(fp,retv); - write_hostent(fp,&result); + if (write_hostent(fp,&result)) + return -1; } /* write the final result code */ WRITE_INT32(fp,retv); |