summaryrefslogtreecommitdiff
path: root/src/starter/parser.y
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2013-01-02 14:18:20 +0100
committerYves-Alexis Perez <corsac@debian.org>2013-01-02 14:18:20 +0100
commitc1343b3278cdf99533b7902744d15969f9d6fdc1 (patch)
treed5ed3dc5677a59260ec41cd39bb284d3e94c91b3 /src/starter/parser.y
parentb34738ed08c2227300d554b139e2495ca5da97d6 (diff)
downloadvyos-strongswan-c1343b3278cdf99533b7902744d15969f9d6fdc1.tar.gz
vyos-strongswan-c1343b3278cdf99533b7902744d15969f9d6fdc1.zip
Imported Upstream version 5.0.1
Diffstat (limited to 'src/starter/parser.y')
-rw-r--r--src/starter/parser.y18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/starter/parser.y b/src/starter/parser.y
index dfaec9ee8..424e3a9fd 100644
--- a/src/starter/parser.y
+++ b/src/starter/parser.y
@@ -17,11 +17,9 @@
#include <stdlib.h>
#include <string.h>
-#include <freeswan.h>
+#include <library.h>
+#include <debug.h>
-#include "../pluto/constants.h"
-#include "../pluto/defs.h"
-#include "../pluto/log.h"
#include "ipsec-parser.h"
#define YYERROR_VERBOSE
@@ -63,7 +61,7 @@ extern kw_entry_t *in_word_set (char *str, unsigned int len);
config_file:
config_file section_or_include
- | /* NULL */
+ | /* NULL */
;
section_or_include:
@@ -79,8 +77,8 @@ section_or_include:
| CONN STRING EOL
{
section_list_t *section = malloc_thing(section_list_t);
-
- section->name = clone_str($2);
+
+ section->name = strdupnull($2);
section->kw = NULL;
section->next = NULL;
_parser_kw = &(section->kw);
@@ -95,7 +93,7 @@ section_or_include:
| CA STRING EOL
{
section_list_t *section = malloc_thing(section_list_t);
- section->name = clone_str($2);
+ section->name = strdupnull($2);
section->kw = NULL;
section->next = NULL;
_parser_kw = &(section->kw);
@@ -136,7 +134,7 @@ statement_kw:
{
new = (kw_list_t *)malloc_thing(kw_list_t);
new->entry = entry;
- new->value = clone_str($3);
+ new->value = strdupnull($3);
new->next = NULL;
if (_parser_kw_last)
_parser_kw_last->next = new;
@@ -223,7 +221,7 @@ config_parsed_t *parser_load_conf(const char *file)
if (err)
{
- plog("%s", parser_errstring);
+ DBG1(DBG_APP, "%s", parser_errstring);
if (cfg)
parser_free_conf(cfg);