Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/nslcd/common.h
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2009-09-27 16:28:09 +0200
committerArthur de Jong <arthur@arthurdejong.org>2009-09-27 16:28:09 +0200
commited1038527fb606459e89d2c2b04ca367737533a7 (patch)
tree863e9d7d9b1beacaf99abb6e298363c5db485bdd /nslcd/common.h
parent118f771f2d694f7cc88a4c4a424869fa91910e33 (diff)
log reading and writing errors with errno message
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@995 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'nslcd/common.h')
-rw-r--r--nslcd/common.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/nslcd/common.h b/nslcd/common.h
index eabbfaa..1ba6eb3 100644
--- a/nslcd/common.h
+++ b/nslcd/common.h
@@ -24,6 +24,8 @@
#ifndef _SERVER_COMMON_H
#define _SERVER_COMMON_H 1
+#include <errno.h>
+
#include "nslcd.h"
#include "common/nslcd-prot.h"
#include "common/tio.h"
@@ -36,11 +38,11 @@
stream */
#define ERROR_OUT_WRITEERROR(fp) \
- log_log(LOG_WARNING,"error writing to client"); \
+ log_log(LOG_WARNING,"error writing to client: %s",strerror(errno)); \
return -1;
#define ERROR_OUT_READERROR(fp) \
- log_log(LOG_WARNING,"error reading from client"); \
+ log_log(LOG_WARNING,"error reading from client: %s",strerror(errno)); \
return -1;
#define ERROR_OUT_BUFERROR(fp) \