From 9a796427d5366c2b4bbff00a0c29809a25ef424c Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Mon, 24 Apr 2017 13:05:53 -0700 Subject: [PATCH] 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. --- omaha/protocol.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/omaha/protocol.go b/omaha/protocol.go index 00dbda3..b3ec12d 100644 --- a/omaha/protocol.go +++ b/omaha/protocol.go @@ -108,9 +108,9 @@ type UpdateRequest struct { } type PingRequest struct { - Active int `xml:"active,attr,omitempty"` - LastActiveReportDays int `xml:"a,attr,omitempty"` - LastReportDays int `xml:"r,attr,omitempty"` + Active int `xml:"active,attr,omitempty"` + LastActiveReportDays *int `xml:"a,attr,omitempty"` + LastReportDays int `xml:"r,attr,omitempty"` } type EventRequest struct {