refactoring: don't copy string_refs for matching 97/202897/3
authorAdrian Szyndela <adrian.s@samsung.com>
Thu, 4 Apr 2019 09:42:37 +0000 (11:42 +0200)
committerAdrian Szyndela <adrian.s@samsung.com>
Thu, 11 Apr 2019 15:13:09 +0000 (17:13 +0200)
commitcfff1667b54abc3310a8324c3afc046367369cc4
treec32c43a46f7c43d9d58360f8520c147892fa91df
parent025693a033210a93c30ae1e2c6d4d2c31a8bca4e
refactoring: don't copy string_refs for matching

This modifies MatchItemSR to use externally built array of names instead of
copying input arrays. The external array was built anyway in case
names were taken from KDBUS_CMD_CONN_INFO ioctl.

The other case, where the array is built from space separated string is
changed in a way that the building process is performed outside of
MatchItemSR. This allows further simplifications.

Change-Id: I13cfba0940f3347be91c9281614a3c66b8cb11b6
16 files changed:
src/internal/array_with_size.hpp [new file with mode: 0644]
src/internal/bus_names_array.hpp [new file with mode: 0644]
src/internal/internal.cpp
src/internal/internal.h
src/internal/policy.cpp
src/internal/policy.hpp
src/kdbus.cpp
src/kdbus.h
src/libdbuspolicy1.cpp
src/stest_performance.cpp
src/test-libdbuspolicy1-method-gdi.cpp
src/test-libdbuspolicy1-method.cpp
src/test-libdbuspolicy1-send_destination_prefix-deny-gdi.cpp
src/test-libdbuspolicy1-send_destination_prefix-deny.cpp
src/test-libdbuspolicy1-signal-gdi.cpp
src/test-libdbuspolicy1-signal.cpp