summaryrefslogtreecommitdiff
path: root/server/ether.c
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2006-11-22 13:16:29 +0000
committerArthur de Jong <arthur@arthurdejong.org>2006-11-22 13:16:29 +0000
commitac8e4bfe6e6cc127856019b4f95b77f0a16a98cc (patch)
tree807b8cb5b084d1345c2201543009e7196f3123d0 /server/ether.c
parente45dcde096907034807924384565f2c1ce2f5af8 (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.c5
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(&ether_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);