]> git.corax.cc Git - toolbox/commitdiff
utils/ipc-ssltunnel: Initialize global variables
authorMatthias Kruk <m@m10k.eu>
Sat, 8 Oct 2022 07:38:57 +0000 (16:38 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 8 Oct 2022 07:38:57 +0000 (16:38 +0900)
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().

utils/ipc-sshtunnel.sh

index 3d365f9a59611f2844a593e5d077a64c7f592317..74e34fa7f40cd37c12b3a9ebbb79f15d5322ea83 100755 (executable)
@@ -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