Skip to content

Commit

Permalink
sbus: disable chaining for SetActive and SetInconsistent
Browse files Browse the repository at this point in the history
Even in the unlikely case when multiple of these methods where
called in parallel, we must treat them as separate calls and
handle them individually to avoid situations like:

- SetInconsistent
- SetActive
- SetInconsistent

Here, if chained, it translates to SetInconsistent -> SetActive, which
is wrong. Therefore we can not chain these signals.
  • Loading branch information
pbrezina committed Oct 5, 2023
1 parent d19c5ad commit b71b567
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/sss_iface/sbus_sss_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
SBUS_CHECK_SYNC((handler), (data), const char *); \
sbus_listener_sync("sssd.Responder.Domain", "SetActive", (path), \
_sbus_sss_invoke_in_s_out__send, \
_sbus_sss_key_s_0, \
NULL, \
(handler), (data)); \
})

Expand All @@ -435,7 +435,7 @@
SBUS_CHECK_RECV((handler_recv)); \
sbus_listener_async("sssd.Responder.Domain", "SetActive", (path), \
_sbus_sss_invoke_in_s_out__send, \
_sbus_sss_key_s_0, \
NULL, \
(handler_send), (handler_recv), (data)); \
})

Expand All @@ -450,7 +450,7 @@
SBUS_CHECK_SYNC((handler), (data), const char *); \
sbus_listener_sync("sssd.Responder.Domain", "SetInconsistent", (path), \
_sbus_sss_invoke_in_s_out__send, \
_sbus_sss_key_s_0, \
NULL, \
(handler), (data)); \
})

Expand All @@ -459,7 +459,7 @@
SBUS_CHECK_RECV((handler_recv)); \
sbus_listener_async("sssd.Responder.Domain", "SetInconsistent", (path), \
_sbus_sss_invoke_in_s_out__send, \
_sbus_sss_key_s_0, \
NULL, \
(handler_send), (handler_recv), (data)); \
})

Expand Down
4 changes: 2 additions & 2 deletions src/sss_iface/sss_iface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@
<annotation name="codegen.Name" value="resp_domain" />
<annotation name="codegen.SyncCaller" value="false" />
<signal name="SetActive">
<arg name="name" type="s" direction="in" key="1" />
<arg name="name" type="s" direction="in" />
</signal>
<signal name="SetInconsistent">
<arg name="name" type="s" direction="in" key="1" />
<arg name="name" type="s" direction="in" />
</signal>
</interface>

Expand Down

0 comments on commit b71b567

Please sign in to comment.