Merge from vscode 4f85c3c94c15457e1d4c9e67da6800630394ea54 (#8757)

* Merge from vscode 4f85c3c94c15457e1d4c9e67da6800630394ea54

* disable failing tests
This commit is contained in:
Anthony Dresser
2019-12-19 23:41:55 -08:00
committed by GitHub
parent 778a34a9d2
commit 74caccdfe6
40 changed files with 2058 additions and 1299 deletions

View File

@@ -178,7 +178,7 @@ export class ExtHostTunnelService extends Disposable implements IExtHostTunnelSe
const address = row.local_address.split(':');
return {
socket: parseInt(row.inode, 10),
ip: address[0],
ip: this.parseIpAddress(address[0]),
port: parseInt(address[1], 16)
};
}).map(port => [port.port, port])
@@ -186,6 +186,17 @@ export class ExtHostTunnelService extends Disposable implements IExtHostTunnelSe
];
}
private parseIpAddress(hex: string): string {
let result = '';
for (let i = hex.length - 2; (i >= 0); i -= 2) {
result += parseInt(hex.substr(i, 2), 16);
if (i !== 0) {
result += '.';
}
}
return result;
}
private loadConnectionTable(stdout: string): Record<string, string>[] {
const lines = stdout.trim().split('\n');
const names = lines.shift()!.trim().split(/\s+/)