Skip to content

fix: fix dbus.Variant Store Method Bug#280

Merged
jsouthworth merged 3 commits intogodbus:masterfrom
golangaccount:master
Nov 12, 2021
Merged

fix: fix dbus.Variant Store Method Bug#280
jsouthworth merged 3 commits intogodbus:masterfrom
golangaccount:master

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