adb: Add "adb disconnect" command for disconnecting TCP/IP devices.
Also check that device is not already connected in "adb connect"
Change-Id: I5f84b56b63d8c6932f23791cac319fd6bc39d36c
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/sysdeps_win32.c b/sysdeps_win32.c
index a8e3bb9..ced91e8 100644
--- a/sysdeps_win32.c
+++ b/sysdeps_win32.c
@@ -435,6 +435,20 @@
}
+int adb_shutdown(int fd)
+{
+ FH f = _fh_from_int(fd);
+
+ if (!f) {
+ return -1;
+ }
+
+ D( "adb_shutdown: %s\n", f->name);
+ shutdown( f->fh_socket, SD_BOTH );
+ return 0;
+}
+
+
int adb_close(int fd)
{
FH f = _fh_from_int(fd);