diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-17 20:32:09 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-02-22 21:05:59 +0100 |
commit | cfe9d718e27b812da4b90c5bda2fea8c9ce4ff7b (patch) | |
tree | 1c025dbed694d0332648f2d440597d47373a0227 /src/main.c | |
parent | 4cee7c09018609332e057359cf8533624d64b918 (diff) |
vty: Remove more globals from the bsc data.
This is a interim solution until we have the new and all mighty
new config file format. This should work for now, makes the init
abit harder to understand though.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 24 |
1 files changed, 16 insertions, 8 deletions
@@ -95,6 +95,20 @@ int main(int argc, char **argv) srand(time(NULL)); cell_vty_init(); + + set = link_set_create(bsc); + if (!set) { + LOGP(DINP, LOGL_ERROR, "Failed to allocate the link.\n"); + return -1; + } + + app = ss7_application_alloc(bsc); + if (!app) { + LOGP(DINP, LOGL_ERROR, "Failed to create the SS7 application.\n"); + return -1; + } + + /* Now parse the configuration file */ if (vty_read_config_file(config, NULL) < 0) { fprintf(stderr, "Failed to read the VTY config.\n"); return -1; @@ -104,15 +118,9 @@ int main(int argc, char **argv) if (rc < 0) return rc; - set = link_init(bsc); - if (!set) - return -1; - - app = ss7_application_alloc(bsc); - if (!app) { - LOGP(DINP, LOGL_ERROR, "Failed to create the SS7 application.\n"); + /* create the links and start */ + if (link_init(bsc, set) != 0) return -1; - } ss7_application_setup(app, APP_CELLMGR, SS7_SET_LINKSET, 0, |