summaryrefslogtreecommitdiffstats
path: root/src/peer.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-04-18 16:36:16 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-04-18 16:36:16 +0200
commit87dd930beddef23e7278df476584d9071b76929c (patch)
tree08fad728710df457a0856b93ebe55be350a15991 /src/peer.c
parentdd5d95468e98c8ad009de2297a12544daa30ad29 (diff)
downloadfastd-87dd930beddef23e7278df476584d9071b76929c.tar
fastd-87dd930beddef23e7278df476584d9071b76929c.zip
Clean up shell command handling
Diffstat (limited to 'src/peer.c')
-rw-r--r--src/peer.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/peer.c b/src/peer.c
index 9aeb81e..42268b7 100644
--- a/src/peer.c
+++ b/src/peer.c
@@ -31,11 +31,11 @@
static inline void on_establish(fastd_context_t *ctx, const fastd_peer_t *peer) {
- fastd_shell_command_exec(ctx, &ctx->conf->on_establish, peer, &peer->local_address, &peer->address, NULL);
+ fastd_shell_command_exec(ctx, &ctx->conf->on_establish, peer, &peer->local_address, &peer->address);
}
static inline void on_disestablish(fastd_context_t *ctx, const fastd_peer_t *peer) {
- fastd_shell_command_exec(ctx, &ctx->conf->on_disestablish, peer, &peer->local_address, &peer->address, NULL);
+ fastd_shell_command_exec(ctx, &ctx->conf->on_disestablish, peer, &peer->local_address, &peer->address);
}
static inline void free_socket(fastd_context_t *ctx, fastd_peer_t *peer) {
@@ -574,11 +574,10 @@ bool fastd_peer_verify_temporary(fastd_context_t *ctx, fastd_peer_t *peer, const
if (!fastd_shell_command_isset(&ctx->conf->on_verify))
exit_bug(ctx, "tried to verify temporary peer without on-verify command");
- fastd_shell_command_t cmd = ctx->conf->on_verify;
- cmd.sync = true; /* TODO: async not supported yet */
+ /* TODO: async not supported yet */
int ret;
- if (!fastd_shell_command_exec(ctx, &cmd, peer, local_addr, peer_addr, &ret))
+ if (!fastd_shell_command_exec_sync(ctx, &ctx->conf->on_verify, peer, local_addr, peer_addr, &ret))
return false;
if (WIFSIGNALED(ret)) {