diff --git a/message.go b/message.go index b47145055..445ac7a75 100644 --- a/message.go +++ b/message.go @@ -137,8 +137,8 @@ func (o *ClusterConfigMessage) GetOption(key string) string { } type Folder struct { - ID string // max:64 - Devices []Device // max:64 + ID string // max:64 + Devices []Device } type Device struct { diff --git a/message_xdr.go b/message_xdr.go index c7f16a173..324125ea4 100644 --- a/message_xdr.go +++ b/message_xdr.go @@ -644,7 +644,7 @@ Folder Structure: struct Folder { string ID<64>; - Device Devices<64>; + Device Devices<>; } */ @@ -670,9 +670,6 @@ func (o Folder) encodeXDR(xw *xdr.Writer) (int, error) { return xw.Tot(), xdr.ErrElementSizeExceeded } xw.WriteString(o.ID) - if len(o.Devices) > 64 { - return xw.Tot(), xdr.ErrElementSizeExceeded - } xw.WriteUint32(uint32(len(o.Devices))) for i := range o.Devices { _, err := o.Devices[i].encodeXDR(xw) @@ -697,9 +694,6 @@ func (o *Folder) UnmarshalXDR(bs []byte) error { func (o *Folder) decodeXDR(xr *xdr.Reader) error { o.ID = xr.ReadStringMax(64) _DevicesSize := int(xr.ReadUint32()) - if _DevicesSize > 64 { - return xdr.ErrElementSizeExceeded - } o.Devices = make([]Device, _DevicesSize) for i := range o.Devices { (&o.Devices[i]).decodeXDR(xr)