summaryrefslogtreecommitdiff
path: root/src/lib/ipcp.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-03-24 19:52:01 +0100
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-03-24 19:52:01 +0100
commit545092a8eaa1a972a2bcaf1b532d74f21db1b623 (patch)
treebecb621b18a37626728378576ffae4dd58b5290a /src/lib/ipcp.c
parentdd30bcdb1d440d812b47c0b998c8f120b271ea9b (diff)
parentc32ccc39cfc793729890204c8d810eb7608f4474 (diff)
downloadouroboros-545092a8eaa1a972a2bcaf1b532d74f21db1b623.tar.gz
ouroboros-545092a8eaa1a972a2bcaf1b532d74f21db1b623.zip
Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be-shm
Diffstat (limited to 'src/lib/ipcp.c')
-rw-r--r--src/lib/ipcp.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/lib/ipcp.c b/src/lib/ipcp.c
index 6bc3c75f..53d717ba 100644
--- a/src/lib/ipcp.c
+++ b/src/lib/ipcp.c
@@ -83,7 +83,6 @@ pid_t ipcp_create(rina_name_t name,
{
pid_t pid = 0;
char * api_id = NULL;
- char * aei_id = NULL;
size_t len = 0;
char * ipcp_dir = "bin/ipcpd";
char * full_name = NULL;
@@ -108,22 +107,13 @@ pid_t ipcp_create(rina_name_t name,
}
sprintf(api_id, "%d", name.api_id);
- aei_id = malloc(n_digits(name.aei_id) + 1);
- if (!aei_id) {
- LOG_ERR("Failed to malloc");
- free(api_id);
- exit(EXIT_FAILURE);
- }
- sprintf(aei_id, "%d", name.aei_id);
-
len += strlen(INSTALL_DIR);
len += strlen(ipcp_dir);
len += 2;
full_name = malloc(len);
- if (!full_name) {
+ if (full_name == NULL) {
LOG_ERR("Failed to malloc");
free(api_id);
- free(aei_id);
exit(EXIT_FAILURE);
}
@@ -133,7 +123,6 @@ pid_t ipcp_create(rina_name_t name,
char * argv[] = {full_name,
name.ap_name, api_id,
- name.ae_name, aei_id,
ipcp_type, 0};
char * envp[] = {0};
@@ -144,7 +133,6 @@ pid_t ipcp_create(rina_name_t name,
LOG_ERR("Failed to load IPCP daemon");
LOG_ERR("Make sure to run the installed version");
free(api_id);
- free(aei_id);
free(full_name);
exit(EXIT_FAILURE);
}
@@ -226,7 +214,7 @@ int ipcp_bootstrap(pid_t pid,
int ipcp_enroll(pid_t pid,
char * dif_name,
- rina_name_t member,
+ char * member_name,
char ** n_1_difs,
ssize_t n_1_difs_size)
{
@@ -240,7 +228,7 @@ int ipcp_enroll(pid_t pid,
msg.code = IPCP_ENROLL;
msg.dif_name = dif_name;
- msg.member = &member;
+ msg.ap_name = member_name;
msg.difs = n_1_difs;
msg.difs_size = n_1_difs_size;