summaryrefslogtreecommitdiffstats
path: root/nanohttp/nanohttp-error.c
diff options
context:
space:
mode:
authorGravatar m0gg2007-11-03 22:40:09 +0000
committerGravatar m0gg2007-11-03 22:40:09 +0000
commit8a6946b18003fae6400a137389f0cb13d0ac4bd6 (patch)
tree1fb0e6f58de5596f8dae00998da18472fb4952a1 /nanohttp/nanohttp-error.c
parentc1a7b2dabdc691139b744f0d4750f3b797b69073 (diff)
downloadcsoap-8a6946b18003fae6400a137389f0cb13d0ac4bd6.tar.gz
csoap-8a6946b18003fae6400a137389f0cb13d0ac4bd6.tar.bz2
Split nanoHTTP and cSOAP logging
Diffstat (limited to 'nanohttp/nanohttp-error.c')
-rw-r--r--nanohttp/nanohttp-error.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/nanohttp/nanohttp-error.c b/nanohttp/nanohttp-error.c
index a556af8..d2f48d7 100644
--- a/nanohttp/nanohttp-error.c
+++ b/nanohttp/nanohttp-error.c
@@ -1,5 +1,6 @@
+/** @file nanohttp-error.c Error handling */
/******************************************************************
-* $Id: nanohttp-error.c,v 1.1 2006/12/09 09:36:57 m0gg Exp $
+* $Id: nanohttp-error.c,v 1.2 2007/11/03 22:40:11 m0gg Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -63,16 +64,12 @@ herror_new(const char *func, int errcode, const char *format, ...)
if (!(impl = (herror_impl_t *) malloc(sizeof(herror_impl_t))))
{
- log_error2("malloc failed (%s)", strerror(errno));
+ log_error("malloc failed (%s)", strerror(errno));
return NULL;
}
impl->errcode = errcode;
-
- if (func)
- impl->func = strdup(func);
- else
- func = NULL;
+ impl->func = func ? strdup(func) : NULL;
va_start(ap, format);
vsprintf(impl->message, format, ap);