summaryrefslogtreecommitdiffstats
path: root/src/protocols/ec25519_fhmqvc/util.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-08-18 22:30:30 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-08-18 22:30:30 +0200
commit50d9aa23342f8a9bc6a87ace12578054eeff36fd (patch)
treed0f2dab9535a25435e33169828e2231f96b0f2c7 /src/protocols/ec25519_fhmqvc/util.c
parentcb3c88e020dbfd028f7d8b79b9bf97bcb0b34ea5 (diff)
downloadfastd-50d9aa23342f8a9bc6a87ace12578054eeff36fd.tar
fastd-50d9aa23342f8a9bc6a87ace12578054eeff36fd.zip
Dynamically create peer configs for dynamic peers
This avoids duplicating the protocol_config field.
Diffstat (limited to 'src/protocols/ec25519_fhmqvc/util.c')
-rw-r--r--src/protocols/ec25519_fhmqvc/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/protocols/ec25519_fhmqvc/util.c b/src/protocols/ec25519_fhmqvc/util.c
index 2aea52d..c716916 100644
--- a/src/protocols/ec25519_fhmqvc/util.c
+++ b/src/protocols/ec25519_fhmqvc/util.c
@@ -80,8 +80,8 @@ void fastd_protocol_ec25519_fhmqvc_set_shell_env(fastd_shell_env_t *env, const f
hexdump(buf, conf.protocol_config->key.public.u8);
fastd_shell_env_set(env, "LOCAL_KEY", buf);
- if (peer && peer->protocol_config) {
- hexdump(buf, peer->protocol_config->public_key.u8);
+ if (peer && peer->config->protocol_config) {
+ hexdump(buf, peer->config->protocol_config->public_key.u8);
fastd_shell_env_set(env, "PEER_KEY", buf);
}
else {
@@ -97,10 +97,10 @@ void fastd_protocol_ec25519_fhmqvc_set_shell_env(fastd_shell_env_t *env, const f
public key.
*/
bool fastd_protocol_ec25519_fhmqvc_describe_peer(const fastd_peer_t *peer, char *buf, size_t len) {
- if (peer && peer->protocol_config) {
+ if (peer && peer->config->protocol_config) {
char dumpbuf[65];
- hexdump(dumpbuf, peer->protocol_config->public_key.u8);
+ hexdump(dumpbuf, peer->config->protocol_config->public_key.u8);
snprintf(buf, len, "%.16s", dumpbuf);
return true;
}