summaryrefslogtreecommitdiff
path: root/src/irmd
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-05-15 10:11:25 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-05-15 10:11:25 +0000
commit0fc0f3701ef4f504e71eadcc92a93faf1dd33bf4 (patch)
treeea16469c2d8fbcb417ed89e0bbd550834d0602a6 /src/irmd
parentb36acfd93b1dc16a153ca9b9077d113732accb4e (diff)
parent9903b8a2f9a7dc8ebac6928dcf2d2b5593ea0615 (diff)
downloadouroboros-0fc0f3701ef4f504e71eadcc92a93faf1dd33bf4.tar.gz
ouroboros-0fc0f3701ef4f504e71eadcc92a93faf1dd33bf4.zip
Merged in dstaesse/ouroboros/be-syntax-dev (pull request #505)
ipcpd: Allow specifying fixed syntax
Diffstat (limited to 'src/irmd')
-rw-r--r--src/irmd/ipcp.c6
-rw-r--r--src/irmd/main.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/src/irmd/ipcp.c b/src/irmd/ipcp.c
index 182970b1..28e91b18 100644
--- a/src/irmd/ipcp.c
+++ b/src/irmd/ipcp.c
@@ -241,14 +241,14 @@ int ipcp_enroll(pid_t api,
return ret;
}
- if (!recv_msg->has_dir_hash_algo || recv_msg->dif_name == NULL) {
+ if (recv_msg->dif_info == NULL) {
ipcp_msg__free_unpacked(recv_msg, NULL);
return -EIPCP;
}
- info->algo = recv_msg->dir_hash_algo;
+ info->dir_hash_algo = recv_msg->dif_info->dir_hash_algo;
- strcpy(info->dif_name, recv_msg->dif_name);
+ strcpy(info->dif_name, recv_msg->dif_info->dif_name);
ipcp_msg__free_unpacked(recv_msg, NULL);
diff --git a/src/irmd/main.c b/src/irmd/main.c
index 3331c754..b3243192 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -423,19 +423,19 @@ static int bootstrap_ipcp(pid_t api,
return -1;
}
- entry->dif_name = strdup(conf->dif_name);
+ entry->dif_name = strdup(conf->dif_info->dif_name);
if (entry->dif_name == NULL) {
pthread_rwlock_unlock(&irmd.reg_lock);
log_warn("Failed to set name of DIF.");
return -ENOMEM;
}
- entry->dir_hash_algo = conf->dir_hash_algo;
+ entry->dir_hash_algo = conf->dif_info->dir_hash_algo;
pthread_rwlock_unlock(&irmd.reg_lock);
log_info("Bootstrapped IPCP %d in DIF %s.",
- entry->api, conf->dif_name);
+ entry->api, conf->dif_info->dif_name);
return 0;
}
@@ -484,7 +484,7 @@ static int enroll_ipcp(pid_t api,
return -ENOMEM;
}
- entry->dir_hash_algo = info.algo;
+ entry->dir_hash_algo = info.dir_hash_algo;
pthread_rwlock_unlock(&irmd.reg_lock);