summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2012-11-16 18:18:16 +0400
committerKozlov Dmitry <xeb@mail.ru>2012-11-16 18:18:16 +0400
commit6ca95447b6e539a867c8744b830acbde6c12d9a7 (patch)
tree15aa161661b5178d1c61637793dbed8738c500d6
parentbf97ff971c4aef091bbddea61c7bc35c1684e095 (diff)
downloadaccel-ppp-6ca95447b6e539a867c8744b830acbde6c12d9a7.tar.gz
accel-ppp-6ca95447b6e539a867c8744b830acbde6c12d9a7.zip
ippool: fixed initialization order
-rw-r--r--accel-pppd/extra/ippool.c12
-rw-r--r--accel-pppd/triton/triton.h1
2 files changed, 9 insertions, 4 deletions
diff --git a/accel-pppd/extra/ippool.c b/accel-pppd/extra/ippool.c
index 9b0e7e43..08fd3854 100644
--- a/accel-pppd/extra/ippool.c
+++ b/accel-pppd/extra/ippool.c
@@ -317,7 +317,12 @@ static int parse_vendor_opt(const char *opt)
}
#endif
-static void ippool_init(void)
+static void ippool_init1(void)
+{
+ ipdb_register(&ipdb);
+}
+
+static void ippool_init2(void)
{
struct conf_sect_t *s = conf_get_section("ip-pool");
struct conf_option_t *opt;
@@ -367,13 +372,12 @@ static void ippool_init(void)
list_for_each_entry(p, &pool_list, entry)
generate_pool(p);
- ipdb_register(&ipdb);
-
#ifdef RADIUS
if (triton_module_loaded("radius"))
triton_event_register_handler(EV_RADIUS_ACCESS_ACCEPT, (triton_event_func)ev_radius_access_accept);
#endif
}
-DEFINE_INIT(51, ippool_init);
+DEFINE_INIT(51, ippool_init1);
+DEFINE_INIT2(52, ippool_init2);
diff --git a/accel-pppd/triton/triton.h b/accel-pppd/triton/triton.h
index 95851c2d..0e1422fa 100644
--- a/accel-pppd/triton/triton.h
+++ b/accel-pppd/triton/triton.h
@@ -140,5 +140,6 @@ void triton_terminate(void);
(type *)( (char *)__mptr - offsetof(type,member) );})
#define DEFINE_INIT(o, func) static void __init __init__(void){triton_register_init(o,func);}
+#define DEFINE_INIT2(o, func) static void __init __init2__(void){triton_register_init(o,func);}
#endif