Revert "Split adb_main.cpp into client and daemon."
This reverts commit cf07494ac2a101c3afbe23a7d85121553f586cf7.
diff --git a/adb/adb.cpp b/adb/adb.cpp
index c4e3434..9abcc73 100644
--- a/adb/adb.cpp
+++ b/adb/adb.cpp
@@ -796,12 +796,13 @@
return 0;
}
-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");
+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");
fflush(stdout);
SendOkay(reply_fd);
+ usb_cleanup();
exit(0);
}