]> git.corax.cc Git - toolbox/commitdiff
include/ipc: Correctly assign `topics' in ipc_endpoint_subscribe()
authorMatthias Kruk <m@m10k.eu>
Sat, 15 Apr 2023 07:26:37 +0000 (16:26 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 15 Apr 2023 07:26:37 +0000 (16:26 +0900)
The `topics' argument of ipc_endpoint_subscribe() is not assigned
from an array, causing the function to subscribe only to the first
topic that is passed to it.

This commit fixes the assignment of the `topics' argument of
ipc_endpoint_subscribe() so that the function will subscribe an
endpoint to more than one topic.

include/ipc.sh

index 194f48cde3caf20d7143cf65695f9ba3247a58a9..b53df748548a3be4a674ea2309f81474724f0e4d 100644 (file)
@@ -692,7 +692,7 @@ _ipc_endpoint_topic_get_subscribers_and_taps() {
 
 ipc_endpoint_subscribe() {
        local endpoint="$1"
-       local topics="$2"
+       local topics=("${@:2}")
 
        local topic
        local -a succeeded