Commit d432b68c authored by Allen Vicencio's avatar Allen Vicencio Committed by Commit Bot

SmbProviderClient: Change mount id to start at 0

Change SmbProviderClient to expect mount_id to start at 0.

CQ-DEPEND=CL:823086

Bug: chromium:757625
Change-Id: I55a13a0e15bf887176825e60c7297827fb45a017
Reviewed-on: https://chromium-review.googlesource.com/823270Reviewed-by: default avatarDan Erat <derat@chromium.org>
Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Commit-Queue: Allen Vicencio <allenvic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523837}
parent ef1fb55f
...@@ -50,7 +50,7 @@ void SmbService::OnMountResponse( ...@@ -50,7 +50,7 @@ void SmbService::OnMountResponse(
return; return;
} }
DCHECK_GT(mount_id, 0); DCHECK_GE(mount_id, 0);
file_system_provider::MountOptions mount_options(options); file_system_provider::MountOptions mount_options(options);
mount_options.file_system_id = base::NumberToString(mount_id); mount_options.file_system_id = base::NumberToString(mount_id);
......
...@@ -138,7 +138,7 @@ class SmbProviderClientImpl : public SmbProviderClient { ...@@ -138,7 +138,7 @@ class SmbProviderClientImpl : public SmbProviderClient {
return; return;
} }
int32_t mount_id = -1; int32_t mount_id = -1;
if (!reader.PopInt32(&mount_id) || mount_id <= 0) { if (!reader.PopInt32(&mount_id) || mount_id < 0) {
DLOG(ERROR) << "Mount: failed to parse mount id"; DLOG(ERROR) << "Mount: failed to parse mount id";
std::move(callback).Run(smbprovider::ERROR_DBUS_PARSE_FAILED, -1); std::move(callback).Run(smbprovider::ERROR_DBUS_PARSE_FAILED, -1);
return; return;
......
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