]> git.corax.cc Git - toolbox/commit
include/ipc: Don't send pubsub messages to oneself
authorMatthias Kruk <m@m10k.eu>
Thu, 9 Mar 2023 06:11:33 +0000 (15:11 +0900)
committerMatthias Kruk <m@m10k.eu>
Thu, 9 Mar 2023 06:25:52 +0000 (15:25 +0900)
commitc469d30e6439bb884286c6431467d4a27c17a132
tree7b22097056befaad88cbae752c2283c0d830e76c
parentbe372d2a83e7443bb85fbc05f3b6bd063cf8610a
include/ipc: Don't send pubsub messages to oneself

When publishing a pubsub message, ipc_endpoint_publish() sends the
message to all subscribers, including the endpoint that is used to
send the message, if it is subscribed to that topic. However, an
endpoint should not receive its own messages.

This commit modifies ipc_endpoint_publish() so that it skips over
the sending endpoint if it is among the recipients.
include/ipc.sh