Split adb_main.cpp into client and daemon.
The name "client" is somewhat misleading as it also contains the host
side adb server, but it's a part of the client binary.
Change-Id: I128b7bab213e330eb21b5010cd1fec5f7a62c8af
diff --git a/adb/adb.cpp b/adb/adb.cpp
index 9abcc73..c4e3434 100644
--- a/adb/adb.cpp
+++ b/adb/adb.cpp
@@ -796,13 +796,12 @@
return 0;
}
-int handle_host_request(const char* service, TransportType type, const char* serial, int reply_fd, asocket *s)
-{
- if(!strcmp(service, "kill")) {
- fprintf(stderr,"adb server killed by remote request\n");
+int handle_host_request(const char* service, TransportType type,
+ const char* serial, int reply_fd, asocket* s) {
+ if (strcmp(service, "kill") == 0) {
+ fprintf(stderr, "adb server killed by remote request\n");
fflush(stdout);
SendOkay(reply_fd);
- usb_cleanup();
exit(0);
}