aboutsummaryrefslogtreecommitdiff
path: root/src/device_registration_info.h
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2016-03-09 16:08:29 -0800
committerVitaly Buka <vitalybuka@google.com>2016-03-10 00:44:55 +0000
commit8bf475745726c1fd672eed2b34c52cf5bfad58e0 (patch)
treeccf28b2693b955d65f5a01565624557a398af680 /src/device_registration_info.h
parentcd7a3a2d4bc87d5c39648f1ebba0b5cfa63f547f (diff)
downloadlibweave-8bf475745726c1fd672eed2b34c52cf5bfad58e0.tar.gz
Fail setup/start if device already registered
Previously device didn't check condition until wifi is switched. Bug we can detect the issue and reply to client in the same request. BUG: 27432528 Change-Id: I6564c47fba86671dbd59dc0ff70cfba3a25d60dc Reviewed-on: https://weave-review.googlesource.com/2890 Reviewed-by: Alex Vakulenko <avakulenko@google.com>
Diffstat (limited to 'src/device_registration_info.h')
-rw-r--r--src/device_registration_info.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/device_registration_info.h b/src/device_registration_info.h
index a488bae..db08ef9 100644
--- a/src/device_registration_info.h
+++ b/src/device_registration_info.h
@@ -115,6 +115,9 @@ class DeviceRegistrationInfo : public NotificationDelegate,
GcdState GetGcdState() const { return gcd_state_; }
+ // Checks whether we have credentials generated during registration.
+ bool HaveRegistrationCredentials() const;
+
private:
friend class DeviceRegistrationInfoTest;
@@ -124,8 +127,6 @@ class DeviceRegistrationInfo : public NotificationDelegate,
return weak_factory_.GetWeakPtr();
}
- // Checks whether we have credentials generated during registration.
- bool HaveRegistrationCredentials() const;
// Calls HaveRegistrationCredentials() and logs an error if no credentials
// are available.
bool VerifyRegistrationCredentials(ErrorPtr* error) const;