diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2015-02-21 21:08:23 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2015-02-21 21:08:23 +0100 |
commit | 2bbc308321894e0fd301766e8d7d78a4ec119053 (patch) | |
tree | cd3b8bab72022801655ad6b420ace93267b29f07 /nest/proto.c | |
parent | 374917adccb955fbb2796955166fabe46a09e096 (diff) |
Store protocol config size inside protocol structure
Make proto_config_new() use this info instead of supplied size.
Thanks to Alexander V. Chernikov for the patch.
Diffstat (limited to 'nest/proto.c')
-rw-r--r-- | nest/proto.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nest/proto.c b/nest/proto.c index 7a1e9bf7..7339e4f4 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -245,7 +245,6 @@ proto_free_ahooks(struct proto *p) /** * proto_config_new - create a new protocol configuration * @pr: protocol the configuration will belong to - * @size: size of the structure including generic data * @class: SYM_PROTO or SYM_TEMPLATE * * Whenever the configuration file says that a new instance @@ -262,9 +261,9 @@ proto_free_ahooks(struct proto *p) * initialized during protos_commit()). */ void * -proto_config_new(struct protocol *pr, unsigned size, int class) +proto_config_new(struct protocol *pr, int class) { - struct proto_config *c = cfg_allocz(size); + struct proto_config *c = cfg_allocz(pr->config_size); if (class == SYM_PROTO) add_tail(&new_config->protos, &c->n); |