guelfey / go.dbus

Native Go bindings for D-Bus
BSD 2-Clause "Simplified" License
124 stars 42 forks source link

It doesn't support empty struct . #49

Closed snyh closed 10 years ago

snyh commented 10 years ago

An empty struct will cause bus connection closed

type of '()' can be show in d-feet. And dbus spec doesn't specify whether an struct can be an empty.

snyh commented 10 years ago

"Empty structures are not allowed; there must be at least one type code between the parentheses." http://dbus.freedesktop.org/doc/dbus-specification.html#container-types

Empty structures are not allowed. Sorry for trouble.

snyh commented 10 years ago

https://github.com/guelfey/go.dbus/blob/master/sig.go#L96
Is it better add an panic when the "t" is an empty structure" instead just return "()" which is not allowed by dbus spec?