summaryrefslogtreecommitdiff
path: root/src/irmd
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2023-11-27 14:43:10 +0100
committerSander Vrijders <[email protected]>2023-11-29 09:57:29 +0100
commit3f24301fff9c544dfe2b89c5737bc3cdf94ef9a9 (patch)
tree35e04e27e4a0e11c91fe3aa201004ac1d83a72e0 /src/irmd
parentc1d679506180bc23241fe14818c0a2dbbcbe3cef (diff)
downloadouroboros-3f24301fff9c544dfe2b89c5737bc3cdf94ef9a9.tar.gz
ouroboros-3f24301fff9c544dfe2b89c5737bc3cdf94ef9a9.zip
include: Rename layer.layer_name to layer.name
The layer_info had a member layer_name which is a bit redundant. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/irmd')
-rw-r--r--src/irmd/configfile.c4
-rw-r--r--src/irmd/ipcp.c4
-rw-r--r--src/irmd/main.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/src/irmd/configfile.c b/src/irmd/configfile.c
index 42a8a152..07f31ccf 100644
--- a/src/irmd/configfile.c
+++ b/src/irmd/configfile.c
@@ -516,13 +516,13 @@ static int toml_ipcp(toml_table_t * table,
if (ret < 0)
return -1;
- strcpy(conf->layer_info.layer_name, bootstrap.u.s);
+ strcpy(conf->layer_info.name, bootstrap.u.s);
free(bootstrap.u.s);
if (bootstrap_ipcp(pid, conf) < 0)
return -1;
- if (toml_autobind(table, pid, name, conf->layer_info.layer_name) < 0)
+ if (toml_autobind(table, pid, name, conf->layer_info.name) < 0)
return -1;
if (toml_register(table, pid) < 0) {
diff --git a/src/irmd/ipcp.c b/src/irmd/ipcp.c
index eeda1fbc..b0d95b44 100644
--- a/src/irmd/ipcp.c
+++ b/src/irmd/ipcp.c
@@ -229,7 +229,7 @@ int ipcp_bootstrap(pid_t pid,
}
info->dir_hash_algo = recv_msg->layer_info->dir_hash_algo;
- strcpy(info->layer_name, recv_msg->layer_info->layer_name);
+ strcpy(info->name, recv_msg->layer_info->name);
ret = recv_msg->result;
ipcp_msg__free_unpacked(recv_msg, NULL);
@@ -272,7 +272,7 @@ int ipcp_enroll(pid_t pid,
}
info->dir_hash_algo = recv_msg->layer_info->dir_hash_algo;
- strcpy(info->layer_name, recv_msg->layer_info->layer_name);
+ strcpy(info->name, recv_msg->layer_info->name);
ipcp_msg__free_unpacked(recv_msg, NULL);
diff --git a/src/irmd/main.c b/src/irmd/main.c
index b97791a4..131bd468 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -640,7 +640,7 @@ int bootstrap_ipcp(pid_t pid,
return -1;
}
- entry->layer = strdup(info.layer_name);
+ entry->layer = strdup(info.name);
if (entry->layer == NULL) {
pthread_rwlock_unlock(&irmd.reg_lock);
log_warn("Failed to set name of layer.");
@@ -652,7 +652,7 @@ int bootstrap_ipcp(pid_t pid,
pthread_rwlock_unlock(&irmd.reg_lock);
log_info("Bootstrapped IPCP %d in layer %s.",
- pid, conf->layer_info.layer_name);
+ pid, conf->layer_info.name);
return 0;
}
@@ -694,7 +694,7 @@ int enroll_ipcp(pid_t pid,
return -1;
}
- ipcp->layer = strdup(info.layer_name);
+ ipcp->layer = strdup(info.name);
if (ipcp->layer == NULL) {
pthread_rwlock_unlock(&irmd.reg_lock);
log_err("Failed to strdup layer_name.");
@@ -706,7 +706,7 @@ int enroll_ipcp(pid_t pid,
pthread_rwlock_unlock(&irmd.reg_lock);
log_info("Enrolled IPCP %d in layer %s.",
- pid, info.layer_name);
+ pid, info.name);
return 0;
}