Commit 5acae4b6 authored by arnarb@chromium.org's avatar arnarb@chromium.org

Tolerate that CMD_SYNC does not exist (per U2F spec).

BUG=405904
R=mschilder,juanlang,xiyuan

Review URL: https://codereview.chromium.org/495033002

Cr-Commit-Position: refs/heads/master@{#291351}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291351 0039d316-1c4b-4281-b951-d872f2087c98
parent 2b465199
......@@ -523,7 +523,10 @@ Gnubby.prototype.sync = function(cb) {
}
function sendInitSentinel() {
var cid = Gnubby.BROADCAST_CID;
var cid = self.cid;
if (cid == Gnubby.defaultChannelId_(self.gnubbyInstance, self.which)) {
cid = Gnubby.BROADCAST_CID;
}
var cmd = GnubbyDevice.CMD_INIT;
self.dev.queueCommand(cid, cmd, nonce);
}
......@@ -628,8 +631,7 @@ Gnubby.prototype.sync = function(cb) {
completionAction = syncCompletionAction;
}
if (Gnubby.gnubbies_.isSharedAccess(this.which) &&
this.cid == Gnubby.defaultChannelId_(this.gnubbyInstance, this.which)) {
if (Gnubby.gnubbies_.isSharedAccess(this.which)) {
setInit();
} else {
setSync();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment