summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Morales <anmorales@google.com>2015-05-27 12:26:59 -0700
committerAndres Morales <anmorales@google.com>2015-05-27 12:30:18 -0700
commita623e45c36f36f855c985f22db78077f828ce389 (patch)
treef3d990e714257c24af496618974d744d067d5d2f
parentaedf605d883b4ebade9c810eb39cbf5125a58c7d (diff)
downloadgatekeeper-a623e45c36f36f855c985f22db78077f828ce389.tar.gz
Bug: 21464654 Change-Id: Ia04c45f758bfa74e7516265347225e786314ef32
-rw-r--r--gatekeeper.cpp6
-rw-r--r--include/gatekeeper/gatekeeper.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/gatekeeper.cpp b/gatekeeper.cpp
index 20794b2..f18a490 100644
--- a/gatekeeper.cpp
+++ b/gatekeeper.cpp
@@ -59,7 +59,7 @@ void GateKeeper::Enroll(const EnrollRequest &request, EnrollResponse *response)
return;
}
- if (ThrottleRequest(uid, user_id, timestamp, &record, response)) return;
+ if (ThrottleRequest(uid, timestamp, &record, response)) return;
if (!IncrementFailureRecord(uid, user_id, timestamp, &record)) {
response->error = ERROR_UNKNOWN;
@@ -135,7 +135,7 @@ void GateKeeper::Verify(const VerifyRequest &request, VerifyResponse *response)
return;
}
- if (ThrottleRequest(uid, user_id, timestamp, &record, response)) return;
+ if (ThrottleRequest(uid, timestamp, &record, response)) return;
if (!IncrementFailureRecord(uid, user_id, timestamp, &record)) {
response->error = ERROR_UNKNOWN;
@@ -251,7 +251,7 @@ uint32_t GateKeeper::ComputeRetryTimeout(const failure_record_t *record) {
return 0;
}
-bool GateKeeper::ThrottleRequest(uint32_t uid, secure_id_t user_id, uint64_t timestamp,
+bool GateKeeper::ThrottleRequest(uint32_t uid, uint64_t timestamp,
failure_record_t *record, GateKeeperMessage *response) {
uint64_t last_checked = record->last_checked_timestamp;
diff --git a/include/gatekeeper/gatekeeper.h b/include/gatekeeper/gatekeeper.h
index 33ffb9f..ff80b39 100644
--- a/include/gatekeeper/gatekeeper.h
+++ b/include/gatekeeper/gatekeeper.h
@@ -187,7 +187,7 @@ private:
*
* Returns true if the request is in the throttle window.
*/
- bool ThrottleRequest(uint32_t uid, secure_id_t user_id, uint64_t timestamp,
+ bool ThrottleRequest(uint32_t uid, uint64_t timestamp,
failure_record_t *record, GateKeeperMessage *response);
};