diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2015-05-22 11:12:48 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2015-05-22 11:12:48 +0200 |
commit | 9fe1d3ca8a6420b4bdaf15a54ab7b13be6cc07eb (patch) | |
tree | adc7df354c283bf28ae58fac8dfd5d9f9f0d87c2 /nest/config.Y | |
parent | d0e23d42de133de706151411d8d4091d07904d29 (diff) |
Fixes unnamed protocols from templates
Diffstat (limited to 'nest/config.Y')
-rw-r--r-- | nest/config.Y | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nest/config.Y b/nest/config.Y index 939bed6a..37551802 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -183,16 +183,18 @@ proto_name: } | FROM SYM { struct symbol *s = cf_default_name(this_proto->protocol->template, &this_proto->protocol->name_counter); + s->class = this_proto->class; + s->def = this_proto; this_proto->name = s->name; + if (($2->class != SYM_TEMPLATE) && ($2->class != SYM_PROTO)) cf_error("Template or protocol name expected"); proto_copy_config(this_proto, $2->def); } | SYM FROM SYM { - if (($3->class != SYM_TEMPLATE) && ($3->class != SYM_PROTO)) cf_error("Template or protocol name expected"); - cf_define_symbol($1, this_proto->class, this_proto); this_proto->name = $1->name; + if (($3->class != SYM_TEMPLATE) && ($3->class != SYM_PROTO)) cf_error("Template or protocol name expected"); proto_copy_config(this_proto, $3->def); } ; |