omaha: distinguish zero and unset in ping active days field

Unlike the other fields unset here would mean unknown rather than "0" so
we must distinguish between the two. In the end it isn't very
significant since our update server and none of our clients use these
self-reported active times, exclusively using when pings were received.
This commit is contained in:
Michael Marineau 2017-04-24 13:05:53 -07:00
parent c7d81825c4
commit 9a796427d5

View file

@ -109,7 +109,7 @@ type UpdateRequest struct {
type PingRequest struct { type PingRequest struct {
Active int `xml:"active,attr,omitempty"` Active int `xml:"active,attr,omitempty"`
LastActiveReportDays int `xml:"a,attr,omitempty"` LastActiveReportDays *int `xml:"a,attr,omitempty"`
LastReportDays int `xml:"r,attr,omitempty"` LastReportDays int `xml:"r,attr,omitempty"`
} }