Store actual serial in sc_server

Before starting the server, the actual device serial (possibly its
ip:port if it's over TCP/IP) must be known.

A serial might be requested via -s/--serial (stored in the
sc_server_params), but the actual serial may change afterwards:
 - if none is provided, then it is retrieved with "adb get-serialno";
 - if --tcpip is requested, then the final serial will be the target
   ip:port.

The requested serial was overwritten by the actual serial in the
sc_server_params struct, which was a bit hacky.

Instead, store a separate serial field in sc_server (and rename the one
from sc_server_params to "req_serial" to avoid confusion).
This commit is contained in:
Romain Vimont 2022-02-04 20:49:35 +01:00
parent 08f16a9dde
commit 5b3ae2cb2f
3 changed files with 60 additions and 63 deletions