--- l2_ch_syslog.c 2001/09/05 07:47:12 1.14
+++ l2_ch_syslog.c 2001/09/06 14:37:53 1.15
@@ -47,7 +47,7 @@
/* allocate private channel configuration */
if ((cfg = (l2_ch_syslog_t *)malloc(sizeof(l2_ch_syslog_t))) == NULL)
- return L2_ERROR;
+ return L2_ERR_MEM;
/* initialize configuration with reasonable defaults */
cfg->pszIdent = NULL;
@@ -71,7 +71,7 @@
/* parameter checks */
if ((cfg = (l2_ch_syslog_t *)ctx->vp) == NULL)
- return L2_ERROR;
+ return L2_ERR_ARG;
/* feed and call generic parameter parsing engine */
L2_PARAM_SET(pa[0], ident, CHARPTR, &cfg->pszIdent);
@@ -92,7 +92,7 @@
/* parameter checks */
if ((cfg = (l2_ch_syslog_t *)ctx->vp) == NULL)
- return L2_ERROR;
+ return L2_ERR_ARG;
/* open channel syslog */
openlog(cfg->pszIdent, cfg->iLogopt, cfg->iFacility);
@@ -109,7 +109,7 @@
/* parameter checks */
if ((cfg = (l2_ch_syslog_t *)ctx->vp) == NULL)
- return L2_ERROR;
+ return L2_ERR_ARG;
/* write message to channel syslog */
syslog(cfg->iPriority, buf);
@@ -132,7 +132,7 @@
/* parameter checks */
if ((cfg = (l2_ch_syslog_t *)ctx->vp) == NULL)
- return L2_ERROR;
+ return L2_ERR_ARG;
/* close channel syslog */
closelog();
@@ -145,7 +145,7 @@
{
/* parameter checks */
if (ctx->vp == NULL)
- return L2_ERROR;
+ return L2_ERR_ARG;
/* destroy channel configuration */
free(ctx->vp);
|