Set device_id to host value only in case of adb protocol.

llvm-svn: 251044
This commit is contained in:
Oleksiy Vyalov 2015-10-22 19:17:32 +00:00
parent c4aaed9255
commit 92b14b9f71
2 changed files with 4 additions and 2 deletions

View File

@ -196,7 +196,8 @@ PlatformAndroid::ConnectRemote(Args& args)
return Error("URL is null.");
if (!UriParser::Parse(url, scheme, host, port, path))
return Error("Invalid URL: %s", url);
m_device_id = host;
if (scheme == "adb")
m_device_id = host;
auto error = PlatformLinux::ConnectRemote(args);
if (error.Success())

View File

@ -126,7 +126,8 @@ PlatformAndroidRemoteGDBServer::ConnectRemote (Args& args)
return Error("URL is null.");
if (!UriParser::Parse (url, scheme, host, remote_port, path))
return Error("Invalid URL: %s", url);
m_device_id = host;
if (scheme == "adb")
m_device_id = host;
std::string connect_url;
auto error = MakeConnectURL (g_remote_platform_pid,