diff options
author | Mike Lockwood <lockwood@android.com> | 2010-04-12 09:57:11 -0400 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2010-04-12 09:59:40 -0400 |
commit | 59ab0c534095afdab0765240a6eaeaad2ab43ab0 (patch) | |
tree | 15e5171518e19cef4bb5839bcb1a6d4afcccdfa9 /adb/adb_client.c | |
parent | 35c8cba41779657a0ec84f9380d9a2cff2a5f7f5 (diff) | |
download | system_core-59ab0c534095afdab0765240a6eaeaad2ab43ab0.tar.gz system_core-59ab0c534095afdab0765240a6eaeaad2ab43ab0.tar.bz2 system_core-59ab0c534095afdab0765240a6eaeaad2ab43ab0.zip |
Revert "Make adb's daemon-port on the host machine configurable."
Fix the build.
This reverts commit 5a00fd1c5542b302e5534d7c424ee92da3d6bceb.
Diffstat (limited to 'adb/adb_client.c')
-rw-r--r-- | adb/adb_client.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/adb/adb_client.c b/adb/adb_client.c index 882810a95..243f0fa53 100644 --- a/adb/adb_client.c +++ b/adb/adb_client.c @@ -16,19 +16,12 @@ static transport_type __adb_transport = kTransportAny; static const char* __adb_serial = NULL; -static int __adb_server_port = DEFAULT_ADB_PORT; - void adb_set_transport(transport_type type, const char* serial) { __adb_transport = type; __adb_serial = serial; } -void adb_set_tcp_specifics(int server_port) -{ - __adb_server_port = server_port; -} - int adb_get_emulator_console_port(void) { const char* serial = __adb_serial; @@ -181,7 +174,7 @@ int _adb_connect(const char *service) } snprintf(tmp, sizeof tmp, "%04x", len); - fd = socket_loopback_client(__adb_server_port, SOCK_STREAM); + fd = socket_loopback_client(ADB_PORT, SOCK_STREAM); if(fd < 0) { strcpy(__adb_error, "cannot connect to daemon"); return -2; @@ -211,10 +204,9 @@ int adb_connect(const char *service) int fd = _adb_connect("host:version"); if(fd == -2) { - fprintf(stdout,"* daemon not running. starting it now on port %d *\n", - __adb_server_port); + fprintf(stdout,"* daemon not running. starting it now *\n"); start_server: - if(launch_server(__adb_server_port)) { + if(launch_server(0)) { fprintf(stderr,"* failed to start daemon *\n"); return -1; } else { @@ -322,3 +314,5 @@ oops: adb_close(fd); return 0; } + + |