summaryrefslogtreecommitdiffstats
path: root/minadbd
diff options
context:
space:
mode:
Diffstat (limited to 'minadbd')
-rw-r--r--minadbd/Android.mk1
-rw-r--r--minadbd/adb_main.cpp6
-rw-r--r--minadbd/services.cpp8
3 files changed, 5 insertions, 10 deletions
diff --git a/minadbd/Android.mk b/minadbd/Android.mk
index a7a3e087d..3db3b4114 100644
--- a/minadbd/Android.mk
+++ b/minadbd/Android.mk
@@ -15,6 +15,7 @@ LOCAL_SRC_FILES := \
fuse_adb_provider.cpp \
services.cpp \
+LOCAL_CLANG := true
LOCAL_MODULE := libminadbd
LOCAL_CFLAGS := $(minadbd_cflags)
LOCAL_CONLY_FLAGS := -Wimplicit-function-declaration
diff --git a/minadbd/adb_main.cpp b/minadbd/adb_main.cpp
index 7fae99a9a..514f19699 100644
--- a/minadbd/adb_main.cpp
+++ b/minadbd/adb_main.cpp
@@ -27,13 +27,9 @@
#include "adb_auth.h"
#include "transport.h"
-int adb_main(int is_daemon, int server_port)
-{
- atexit(usb_cleanup);
-
+int adb_main(int is_daemon, int server_port, int /* reply_fd */) {
adb_device_banner = "sideload";
- // No SIGCHLD. Let the service subproc handle its children.
signal(SIGPIPE, SIG_IGN);
// We can't require authentication for sideloading. http://b/22025550.
diff --git a/minadbd/services.cpp b/minadbd/services.cpp
index dd1fd7c4b..5c1d35614 100644
--- a/minadbd/services.cpp
+++ b/minadbd/services.cpp
@@ -61,8 +61,7 @@ static void sideload_host_service(int sfd, void* data) {
exit(result == 0 ? 0 : 1);
}
-static int create_service_thread(void (*func)(int, void *), void *cookie)
-{
+static int create_service_thread(void (*func)(int, void *), void *cookie) {
int s[2];
if(adb_socketpair(s)) {
printf("cannot create service socket pair\n");
@@ -75,8 +74,7 @@ static int create_service_thread(void (*func)(int, void *), void *cookie)
sti->cookie = cookie;
sti->fd = s[1];
- adb_thread_t t;
- if (adb_thread_create( &t, service_bootstrap_func, sti)){
+ if (!adb_thread_create(service_bootstrap_func, sti)) {
free(sti);
adb_close(s[0]);
adb_close(s[1]);
@@ -88,7 +86,7 @@ static int create_service_thread(void (*func)(int, void *), void *cookie)
return s[0];
}
-int service_to_fd(const char* name) {
+int service_to_fd(const char* name, const atransport* transport) {
int ret = -1;
if (!strncmp(name, "sideload:", 9)) {