From: Matthias Kruk Date: Sat, 8 Oct 2022 07:38:57 +0000 (+0900) Subject: utils/ipc-ssltunnel: Initialize global variables X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=ce959f477ebc28af30a35aaa3ac2652fa520728a;p=toolbox utils/ipc-ssltunnel: Initialize global variables In ipc-ssltunnel, global variables are used to store the topics and hooks that are passed to ipc-tap and ipc-inject. These variables are declared in main(), however not all of them are initialized. While this is not a bug, the function should either initialize all of the arrays or none at all. This commit modifies ipc-ssltunnel to initialize all of the arrays in main(). --- diff --git a/utils/ipc-sshtunnel.sh b/utils/ipc-sshtunnel.sh index 3d365f9..74e34fa 100755 --- a/utils/ipc-sshtunnel.sh +++ b/utils/ipc-sshtunnel.sh @@ -120,7 +120,9 @@ main() { local remote input_topics=() - output_topics=() + output_topics=() + tap_hooks=() + inject_hooks=() opt_add_arg "i" "input-topic" "v" "" "Topic to relay from the remote side (may be used more than once)" \ "" _array_add