diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2006-11-22 13:16:29 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2006-11-22 13:16:29 +0000 |
commit | ac8e4bfe6e6cc127856019b4f95b77f0a16a98cc (patch) | |
tree | 807b8cb5b084d1345c2201543009e7196f3123d0 /server/ether.c | |
parent | e45dcde096907034807924384565f2c1ce2f5af8 (diff) |
only flush the stream after writing all records (not every time) and more logging consistency
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@112 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'server/ether.c')
-rw-r--r-- | server/ether.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/ether.c b/server/ether.c index 524923a..8db4f3e 100644 --- a/server/ether.c +++ b/server/ether.c @@ -221,14 +221,13 @@ int nslcd_ether_all(FILE *fp) /* loop over all results */ while ((retv=nss2nslcd(_nss_ldap_getent(ðer_context,&result,buffer,1024,&errnop,_nss_ldap_filt_getetherent,LM_ETHERS,_nss_ldap_parse_ether)))==NSLCD_RESULT_SUCCESS) { - /* write the result code */ + /* write the result */ WRITE_INT32(fp,retv); - /* write the ether entry */ LDF_ETHER; - fflush(fp); } /* write the final result code */ WRITE_INT32(fp,retv); + WRITE_FLUSH(fp); /* FIXME: if a previous call returns what happens to the context? */ _nss_ldap_enter(); _nss_ldap_ent_context_release(ether_context); |