Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix dbus.Variant Store Method Bug #280

Merged
merged 3 commits into from
Nov 12, 2021

Conversation

golangaccount
Copy link

when Store Method Parm is []*struct type,it work not well
because in isConvertibleTo Func, it not conside Kind is ptr
and elem is struct condition

I add a switch case to transform type

when Store Method Parm is []*struct type,it work not well
because in isConvertibleTo Func, it not conside Kind is ptr
and elem is struct condition

I add a switch case to transform type
@jsouthworth
Copy link
Member

Can add a test case for this?

@golangaccount
Copy link
Author

Can add a test case for this?

ok i will add unit test later

switch case fallthrough key word not exec next case condition
it always exec next case exp, so use isConvertibleTo call replace
when we use dbus to communicate, variant maybe lost
data type info, because args was transform to bytes.
so in unit test,first encode message ,then decode bytes.
(it simulate one communicate).
@jsouthworth jsouthworth merged commit c76a61c into godbus:master Nov 12, 2021
@jsouthworth
Copy link
Member

Thanks!

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.

2 participants