MEDIUM: cfgparse: use the new error reporting framework for remaining cfg_keywords
All keywords registered using a cfg_kw_list now make use of the new error reporting
framework. This allows easier and more precise error reporting without having to
deal with complex buffer allocation issues.
diff --git a/include/common/cfgparse.h b/include/common/cfgparse.h
index b43f899..118d098 100644
--- a/include/common/cfgparse.h
+++ b/include/common/cfgparse.h
@@ -1,23 +1,23 @@
/*
- include/common/cfgparse.h
- Configuration parsing functions.
-
- Copyright (C) 2000-2008 Willy Tarreau - w@1wt.eu
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation, version 2.1
- exclusively.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
+ * include/common/cfgparse.h
+ * Configuration parsing functions.
+ *
+ * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
#ifndef _COMMON_CFGPARSE_H
#define _COMMON_CFGPARSE_H
@@ -43,8 +43,7 @@
int section_type, /* current section CFG_{GLOBAL|LISTEN} */
struct proxy *curpx, /* current proxy (NULL in GLOBAL) */
struct proxy *defpx, /* default proxy (NULL in GLOBAL) */
- char *err, /* error message buffer (do not add '\n') */
- int errlen); /* error buffer size, '\0' included */
+ char **err); /* error or warning message output pointer */
};
/* A keyword list. It is a NULL-terminated array of keywords. It embeds a