Commit graph

6 commits

Author SHA1 Message Date
Peter Hutterer
95a84e797a treewide: replace !strcmp() with spa_streq()
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Wim Taymans
461e3db741 tests: fix some leaks
See #497
2020-12-21 20:07:02 +01:00
Wim Taymans
fc2b0b20ad hook: zero hooks before adding them
Clear the hook before adding it so that we are sure the removed
callback doesn't contain garbage and cause a crash on disconnect.

Mark the removed and priv fields as private. Make sure to add the
removed callback after adding the hook.

Fixes a crash in kwin
2020-11-20 09:40:24 +01:00
Wim Taymans
a2549fc638 clean the hook lists
Make sure the hook lists are emptied so that the removed callbacks
are called. The callers should really remove the hook they installed
themselves but this is a last chance to fix things up.
2020-11-06 15:55:33 +01:00
Wim Taymans
cd71b05fd0 tests: zero test data
hooks need to be zeroed or else they causes crashes on _remove when the
remove callback is called.

Fixes #368
2020-11-06 09:30:21 +01:00
George Kiagiadakis
e00c0ffd2d tests: add endpoint unit test
This tests exporting a PW_TYPE_INTERFACE_Endpoint and binding
a proxy for it through the registry, verifying that info and params
are propagated properly from one to the other
2020-03-27 14:56:07 +00:00