Skip to content

Comments

mctpd: Update interface vtables when we change to BusOwner role#138

Merged
jk-ozlabs merged 1 commit intoCodeConstruct:mainfrom
jk-ozlabs:dev/role-set
Feb 24, 2026
Merged

mctpd: Update interface vtables when we change to BusOwner role#138
jk-ozlabs merged 1 commit intoCodeConstruct:mainfrom
jk-ozlabs:dev/role-set

Conversation

@jk-ozlabs
Copy link
Member

@jk-ozlabs jk-ozlabs commented Feb 12, 2026

Currently, setting an interface's Role property only sets the link->role.

However, we also want to expose the BusOwner1 interface when changing from Unknown to BusOwner, so register the bus_link_owner_vtable on the interface object when this happens.

dbus does not like the vtables changing during a call, so we defer this to the main loop context.

Fixes: #130

@jk-ozlabs jk-ozlabs force-pushed the dev/role-set branch 2 times, most recently from 99e42aa to 1f32085 Compare February 17, 2026 06:22
@jk-ozlabs jk-ozlabs marked this pull request as ready for review February 19, 2026 01:20
Currently, setting an interface's Role property only sets the
link->role.

However, we also want to expose the BusOwner1 interface when changing
from Unknown to BusOwner, so register the bus_link_owner_vtable on the
interface object when this happens.

dbus does not like the vtables changing during a call, so we defer this
to the main loop context.

Fixes: CodeConstruct#130
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
@jk-ozlabs jk-ozlabs merged commit 4df64d5 into CodeConstruct:main Feb 24, 2026
3 checks passed
@jk-ozlabs jk-ozlabs deleted the dev/role-set branch February 24, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting role from Unknown to BusOwner does not create D-Bus interfaces

1 participant