Fix multi-namespace SDL event subscribe 92/7692/2 v0.9.6
authorTimo Tietavainen <timo.tietavainen@nokia.com>
Mon, 7 Feb 2022 11:16:51 +0000 (13:16 +0200)
committerTimo Tietavainen <timo.tietavainen@nokia.com>
Mon, 7 Feb 2022 15:50:23 +0000 (17:50 +0200)
commit40508c8e2b5154083afffffdfbc9ffcf2c7f868c
treefc5582783b96ed76ef5e6d0e019c955b2f5df58d
parent4d1222c6d4954e2a2855833696dc3b44418714a6
Fix multi-namespace SDL event subscribe

SDL event channel internal format was wrongly showed to application
when the same application instance was subscribing to receive SDL
events from multiple namespaces. In that case subscribes were all
registered to the first namespace in SDL and hence when an event in a
channel belonging to another namespace was triggered, namespace internal
format '{other-namespace},' was showed in front of channel name. With
this commit change namespace lookup from channel name to search from
left to right the first comma ',' character. String after comma is
a channel name what should be showed to an application and all before
the comma ',' character can be silently parsed away in SDL.

Issue-Id: RIC-885

Signed-off-by: Timo Tietavainen <timo.tietavainen@nokia.com>
Change-Id: I90b94862670e1e529381112e385b65250e7cb275
docs/release-notes.rst
internal/sdlgoredis/sdlgoredis.go
internal/sdlgoredis/sdlgoredis_test.go
sdl_test.go
syncstorage.go