diff options
Diffstat (limited to 'src/irmd')
-rw-r--r-- | src/irmd/main.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c index a69dd526..cc9160bf 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -212,6 +212,9 @@ static pid_t get_ipcp_by_dst_name(char * dst_name) list_for_each(p, &irmd->ipcps) { struct ipcp_entry * e = list_entry(p, struct ipcp_entry, next); + if (e->dif_name == NULL) + continue; + if (strcmp(e->dif_name, dif_name) == 0) return e->api; } @@ -1742,7 +1745,7 @@ void * irm_sanitize() if (kill(f->n_api, 0) < 0) { struct shm_ap_rbuff * n_rb = - shm_ap_rbuff_open(f->n_api); + shm_ap_rbuff_open_s(f->n_api); bmp_release(irmd->port_ids, f->port_id); list_del(&f->next); @@ -1755,13 +1758,17 @@ void * irm_sanitize() continue; } if (kill(f->n_1_api, 0) < 0) { - struct shm_ap_rbuff * n_1_rb = - shm_ap_rbuff_open(f->n_1_api); + struct shm_ap_rbuff * n_1_rb_s = + shm_ap_rbuff_open_s(f->n_1_api); + struct shm_ap_rbuff * n_1_rb_n = + shm_ap_rbuff_open_n(f->n_1_api); list_del(&f->next); LOG_ERR("IPCP %d gone, flow %d removed.", f->n_1_api, f->port_id); - if (n_1_rb != NULL) - shm_ap_rbuff_destroy(n_1_rb); + if (n_1_rb_n != NULL) + shm_ap_rbuff_destroy(n_1_rb_n); + if (n_1_rb_s != NULL) + shm_ap_rbuff_destroy(n_1_rb_s); irm_flow_destroy(f); } } @@ -2152,7 +2159,6 @@ int main(int argc, char ** argv) } } - if (!use_stdout && (log_dir = opendir(INSTALL_PREFIX LOG_DIR)) != NULL) { while ((ent = readdir(log_dir)) != NULL) { |