diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-04-27 16:17:39 +0000 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-04-27 16:17:39 +0000 |
commit | ee2c0eb9f0777e08b00fe7cdfac912a84dd29cf4 (patch) | |
tree | 137c34f79897b5f371a65dd14208b77201d1e907 /src/ipcpd/normal/main.c | |
parent | 1f8f2ebe3bb385593755b69bd264ff5f831a22ae (diff) | |
parent | b398dbe5cfd12b928e00f9a22cd6826bbdfb18d7 (diff) | |
download | ouroboros-ee2c0eb9f0777e08b00fe7cdfac912a84dd29cf4.tar.gz ouroboros-ee2c0eb9f0777e08b00fe7cdfac912a84dd29cf4.zip |
Merged in dstaesse/ouroboros/be-cap (pull request #495)
Be cap
Diffstat (limited to 'src/ipcpd/normal/main.c')
-rw-r--r-- | src/ipcpd/normal/main.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c index ab8cf387..9228f36b 100644 --- a/src/ipcpd/normal/main.c +++ b/src/ipcpd/normal/main.c @@ -116,21 +116,21 @@ static int boot_components(void) log_dbg("Starting ribmgr."); - if (ribmgr_init()) { - log_err("Failed to initialize RIB manager."); + if (dir_init()) { + log_err("Failed to initialize directory."); goto fail_addr_auth; } - if (dir_init()) { - log_err("Failed to initialize directory."); - goto fail_ribmgr; + if (ribmgr_init()) { + log_err("Failed to initialize RIB manager."); + goto fail_dir; } log_dbg("Ribmgr started."); if (frct_init()) { log_err("Failed to initialize FRCT."); - goto fail_dir; + goto fail_ribmgr; } if (fa_init()) { @@ -180,10 +180,10 @@ static int boot_components(void) fa_fini(); fail_frct: frct_fini(); - fail_dir: - dir_fini(); fail_ribmgr: ribmgr_fini(); + fail_dir: + dir_fini(); fail_addr_auth: addr_auth_fini(); fail_name: @@ -208,16 +208,17 @@ void shutdown_components(void) frct_fini(); - dir_fini(); - ribmgr_fini(); + dir_fini(); + addr_auth_fini(); free(ipcpi.dif_name); } -static int normal_ipcp_enroll(const char * dst) +static int normal_ipcp_enroll(const char * dst, + struct dif_info * info) { if (rib_add(RIB_ROOT, MEMBERS_NAME)) { log_err("Failed to create members."); @@ -237,7 +238,11 @@ static int normal_ipcp_enroll(const char * dst) log_dbg("Enrolled with " HASH_FMT, HASH_VAL(dst)); - return ipcpi.dir_hash_algo; + info->algo = ipcpi.dir_hash_algo; + + strcpy(info->dif_name, ipcpi.dif_name); + + return 0; } const struct ros { |