aboutsummaryrefslogtreecommitdiffstats
path: root/minadbd
diff options
context:
space:
mode:
Diffstat (limited to 'minadbd')
-rw-r--r--minadbd/adb.h4
-rw-r--r--minadbd/services.c4
-rw-r--r--minadbd/transport.c21
3 files changed, 2 insertions, 27 deletions
diff --git a/minadbd/adb.h b/minadbd/adb.h
index 1f28279..d389165 100644
--- a/minadbd/adb.h
+++ b/minadbd/adb.h
@@ -244,15 +244,11 @@ void kick_transport( atransport* t );
#if ADB_HOST
int get_available_local_transport_index();
#endif
-int init_socket_transport(atransport *t, int s, int port, int local);
void init_usb_transport(atransport *t, usb_handle *usb, int state);
/* for MacOS X cleanup */
void close_usb_devices();
-/* cause new transports to be init'd and added to the list */
-void register_socket_transport(int s, const char *serial, int port, int local);
-
/* these should only be used for the "adb disconnect" command */
void unregister_transport(atransport *t);
void unregister_all_tcp_transports();
diff --git a/minadbd/services.c b/minadbd/services.c
index aef37f7..4698528 100644
--- a/minadbd/services.c
+++ b/minadbd/services.c
@@ -46,7 +46,7 @@ void *service_bootstrap_func(void *x)
static void sideload_service(int s, void *cookie)
{
unsigned char buf[4096];
- unsigned count = (unsigned) cookie;
+ unsigned count = (unsigned)(uintptr_t)cookie;
int fd;
fprintf(stderr, "sideload_service invoked\n");
@@ -149,7 +149,7 @@ int service_to_fd(const char *name)
int ret = -1;
if (!strncmp(name, "sideload:", 9)) {
- ret = create_service_thread(sideload_service, (void*) atoi(name + 9));
+ ret = create_service_thread(sideload_service, (void*)(uintptr_t)atoi(name + 9));
#if 0
} else if(!strncmp(name, "echo:", 5)){
ret = create_service_thread(echo_service, 0);
diff --git a/minadbd/transport.c b/minadbd/transport.c
index ff20049..4c0c97f 100644
--- a/minadbd/transport.c
+++ b/minadbd/transport.c
@@ -678,27 +678,6 @@ retry:
return result;
}
-void register_socket_transport(int s, const char *serial, int port, int local)
-{
- atransport *t = calloc(1, sizeof(atransport));
- char buff[32];
-
- if (!serial) {
- snprintf(buff, sizeof buff, "T-%p", t);
- serial = buff;
- }
- D("transport: %s init'ing for socket %d, on port %d\n", serial, s, port);
- if ( init_socket_transport(t, s, port, local) < 0 ) {
- adb_close(s);
- free(t);
- return;
- }
- if(serial) {
- t->serial = strdup(serial);
- }
- register_transport(t);
-}
-
void register_usb_transport(usb_handle *usb, const char *serial, unsigned writeable)
{
atransport *t = calloc(1, sizeof(atransport));