Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit 3d85e9d

Browse files
YadongQisysopenci
authored andcommitted
Remove hostfwd if no adb/fastboot port specified in config file
Remove hostfwd if no adb/fastboot port specified in config file Tracked-On: OAM-102312 Signed-off-by: Yadong Qi <yadong.qi@intel.com>
1 parent 2c822b8 commit 3d85e9d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/guest/start.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,11 +710,11 @@ static void setup_vnet(GKeyFile *gkf, char **p, size_t *size) {
710710
if (val && val1) {
711711
cx = snprintf(buf, bs, " -netdev user,id=net0,hostfwd=tcp::%s-:5555,hostfwd=tcp::%s-:5554", val, val1);
712712
} else if (val) {
713-
cx = snprintf(buf, bs, " -netdev user,id=net0,hostfwd=tcp::%s-:5555,hostfwd=tcp::5554-:5554", val);
713+
cx = snprintf(buf, bs, " -netdev user,id=net0,hostfwd=tcp::%s-:5555", val);
714714
} else if (val1) {
715-
cx = snprintf(buf, bs, " -netdev user,id=net0,hostfwd=tcp::5555-:5555,hostfwd=tcp::%s-:5554", val1);
715+
cx = snprintf(buf, bs, " -netdev user,id=net0,hostfwd=tcp::%s-:5554", val1);
716716
} else {
717-
cx = snprintf(buf, bs, " -netdev user,id=net0,hostfwd=tcp::5555-:5555,hostfwd=tcp::5554-:5554");
717+
cx = snprintf(buf, bs, " -netdev user,id=net0");
718718
}
719719

720720
if (cx < 0 || cx >= bs)

0 commit comments

Comments
 (0)