From ca6744c78bf6d7733db92a53a93510c9680cdb74 Mon Sep 17 00:00:00 2001 From: Mitchel Humpherys <mitchelh@codeaurora.org> Date: Fri, 19 Sep 2014 11:35:38 -0700 Subject: [PATCH] lrdpv2: randomize t32 intercom port Currently our generated t32 launcher script always uses port 20,000 for intercom. This prevents end users from launching two instances of t32 without hacking up the config file by hand. Randomize the port number to avoid this (there will still be a chance of collision, but it should be negligible). Change-Id: Ia6f63a69e0ed315ac08c58d9903c2d1ef34b6c69 --- linux-ramdump-parser-v2/ramdump.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-ramdump-parser-v2/ramdump.py b/linux-ramdump-parser-v2/ramdump.py index eebc6ea..537a2f3 100755 --- a/linux-ramdump-parser-v2/ramdump.py +++ b/linux-ramdump-parser-v2/ramdump.py @@ -16,6 +16,7 @@ import struct import gzip import functools import string +import random from boards import get_supported_boards, get_supported_ids from tempfile import NamedTemporaryFile @@ -703,7 +704,7 @@ class RamDump(): launch_config.write('\n') launch_config.write('RCL=NETASSIST\n') launch_config.write('PACKLEN=1024\n') - launch_config.write('PORT=20000\n') + launch_config.write('PORT=%d\n' % random.randint(20000, 30000)) launch_config.write('\n') launch_config.close() -- GitLab