Loading adb/file_sync_client.c +0 −9 Original line number Diff line number Diff line Loading @@ -529,17 +529,12 @@ remote_error: } else { memcpy(buffer, &id, 4); buffer[4] = 0; // strcpy(buffer,"unknown reason"); } fprintf(stderr,"failed to copy '%s' to '%s': %s\n", rpath, lpath, buffer); return 0; } /* --- */ static void do_sync_ls_cb(unsigned mode, unsigned size, unsigned time, const char *name, void *cookie) { Loading Loading @@ -573,7 +568,6 @@ struct copyinfo unsigned int mode; unsigned int size; int flag; //char data[0]; }; copyinfo *mkcopyinfo(const char *spath, const char *dpath, Loading Loading @@ -601,7 +595,6 @@ copyinfo *mkcopyinfo(const char *spath, const char *dpath, snprintf((char*) ci->src, ssize, isdir ? "%s%s/" : "%s%s", spath, name); snprintf((char*) ci->dst, dsize, isdir ? "%s%s/" : "%s%s", dpath, name); // fprintf(stderr,"mkcopyinfo('%s','%s')\n", ci->src, ci->dst); return ci; } Loading @@ -615,8 +608,6 @@ static int local_build_list(copyinfo **filelist, copyinfo *dirlist = 0; copyinfo *ci, *next; // fprintf(stderr,"local_build_list('%s','%s')\n", lpath, rpath); d = opendir(lpath); if(d == 0) { fprintf(stderr,"cannot open '%s': %s\n", lpath, strerror(errno)); Loading adb/sockets.c +3 −9 Original line number Diff line number Diff line Loading @@ -45,8 +45,6 @@ int sendfailmsg(int fd, const char *reason) return writex(fd, reason, len); } //extern int online; static unsigned local_socket_next_id = 1; static asocket local_socket_list = { Loading Loading @@ -199,7 +197,6 @@ static void local_socket_ready(asocket *s) /* far side is ready for data, pay attention to readable events */ fdevent_add(&s->fde, FDE_READ); // D("LS(%d): ready()\n", s->id); } static void local_socket_close(asocket *s) Loading Loading @@ -240,7 +237,7 @@ static void local_socket_destroy(asocket *s) static void local_socket_close_locked(asocket *s) { D("entered. LS(%d) fd=%d\n", s->id, s->fd); D("entered local_socket_close_locked. LS(%d) fd=%d\n", s->id, s->fd); if(s->peer) { D("LS(%d): closing peer. peer->id=%d peer->fd=%d\n", s->id, s->peer->id, s->peer->fd); Loading Loading @@ -403,7 +400,6 @@ static void local_socket_event_func(int fd, unsigned ev, void *_s) ** catching it here means we may skip the last few ** bytes of readable data. */ // s->close(s); D("LS(%d): FDE_ERROR (fd=%d)\n", s->id, s->fd); return; Loading @@ -422,8 +418,6 @@ asocket *create_local_socket(int fd) install_local_socket(s); fdevent_install(&s->fde, fd, local_socket_event_func, s); /* fdevent_add(&s->fde, FDE_ERROR); */ //fprintf(stderr, "Created local socket in create_local_socket \n"); D("LS(%d): created (fd=%d)\n", s->id, s->fd); return s; } Loading adb/usb_linux.c +6 −2 Original line number Diff line number Diff line Loading @@ -379,6 +379,7 @@ static int usb_bulk_read(usb_handle *h, void *data, int len) struct usbdevfs_urb *out = NULL; int res; D("++ usb_bulk_read ++\n"); memset(urb, 0, sizeof(*urb)); urb->type = USBDEVFS_URB_TYPE_BULK; urb->endpoint = h->ep_in; Loading Loading @@ -441,6 +442,7 @@ static int usb_bulk_read(usb_handle *h, void *data, int len) } fail: adb_mutex_unlock(&h->lock); D("-- usb_bulk_read --\n"); return res; } Loading @@ -451,6 +453,7 @@ int usb_write(usb_handle *h, const void *_data, int len) int n; int need_zero = 0; D("++ usb_write ++\n"); if(h->zero_mask) { /* if we need 0-markers and our transfer ** is an even multiple of the packet size, Loading Loading @@ -480,6 +483,7 @@ int usb_write(usb_handle *h, const void *_data, int len) return n; } D("-- usb_write --\n"); return 0; } Loading Loading @@ -554,7 +558,7 @@ void usb_kick(usb_handle *h) int usb_close(usb_handle *h) { D("[ usb close ... ]\n"); D("++ usb close ++\n"); adb_mutex_lock(&usb_lock); h->next->prev = h->prev; h->prev->next = h->next; Loading @@ -562,7 +566,7 @@ int usb_close(usb_handle *h) h->next = 0; adb_close(h->desc); D("[ usb closed %p (fd = %d) ]\n", h, h->desc); D("-- usb closed %p (fd = %d) --\n", h, h->desc); adb_mutex_unlock(&usb_lock); free(h); Loading Loading
adb/file_sync_client.c +0 −9 Original line number Diff line number Diff line Loading @@ -529,17 +529,12 @@ remote_error: } else { memcpy(buffer, &id, 4); buffer[4] = 0; // strcpy(buffer,"unknown reason"); } fprintf(stderr,"failed to copy '%s' to '%s': %s\n", rpath, lpath, buffer); return 0; } /* --- */ static void do_sync_ls_cb(unsigned mode, unsigned size, unsigned time, const char *name, void *cookie) { Loading Loading @@ -573,7 +568,6 @@ struct copyinfo unsigned int mode; unsigned int size; int flag; //char data[0]; }; copyinfo *mkcopyinfo(const char *spath, const char *dpath, Loading Loading @@ -601,7 +595,6 @@ copyinfo *mkcopyinfo(const char *spath, const char *dpath, snprintf((char*) ci->src, ssize, isdir ? "%s%s/" : "%s%s", spath, name); snprintf((char*) ci->dst, dsize, isdir ? "%s%s/" : "%s%s", dpath, name); // fprintf(stderr,"mkcopyinfo('%s','%s')\n", ci->src, ci->dst); return ci; } Loading @@ -615,8 +608,6 @@ static int local_build_list(copyinfo **filelist, copyinfo *dirlist = 0; copyinfo *ci, *next; // fprintf(stderr,"local_build_list('%s','%s')\n", lpath, rpath); d = opendir(lpath); if(d == 0) { fprintf(stderr,"cannot open '%s': %s\n", lpath, strerror(errno)); Loading
adb/sockets.c +3 −9 Original line number Diff line number Diff line Loading @@ -45,8 +45,6 @@ int sendfailmsg(int fd, const char *reason) return writex(fd, reason, len); } //extern int online; static unsigned local_socket_next_id = 1; static asocket local_socket_list = { Loading Loading @@ -199,7 +197,6 @@ static void local_socket_ready(asocket *s) /* far side is ready for data, pay attention to readable events */ fdevent_add(&s->fde, FDE_READ); // D("LS(%d): ready()\n", s->id); } static void local_socket_close(asocket *s) Loading Loading @@ -240,7 +237,7 @@ static void local_socket_destroy(asocket *s) static void local_socket_close_locked(asocket *s) { D("entered. LS(%d) fd=%d\n", s->id, s->fd); D("entered local_socket_close_locked. LS(%d) fd=%d\n", s->id, s->fd); if(s->peer) { D("LS(%d): closing peer. peer->id=%d peer->fd=%d\n", s->id, s->peer->id, s->peer->fd); Loading Loading @@ -403,7 +400,6 @@ static void local_socket_event_func(int fd, unsigned ev, void *_s) ** catching it here means we may skip the last few ** bytes of readable data. */ // s->close(s); D("LS(%d): FDE_ERROR (fd=%d)\n", s->id, s->fd); return; Loading @@ -422,8 +418,6 @@ asocket *create_local_socket(int fd) install_local_socket(s); fdevent_install(&s->fde, fd, local_socket_event_func, s); /* fdevent_add(&s->fde, FDE_ERROR); */ //fprintf(stderr, "Created local socket in create_local_socket \n"); D("LS(%d): created (fd=%d)\n", s->id, s->fd); return s; } Loading
adb/usb_linux.c +6 −2 Original line number Diff line number Diff line Loading @@ -379,6 +379,7 @@ static int usb_bulk_read(usb_handle *h, void *data, int len) struct usbdevfs_urb *out = NULL; int res; D("++ usb_bulk_read ++\n"); memset(urb, 0, sizeof(*urb)); urb->type = USBDEVFS_URB_TYPE_BULK; urb->endpoint = h->ep_in; Loading Loading @@ -441,6 +442,7 @@ static int usb_bulk_read(usb_handle *h, void *data, int len) } fail: adb_mutex_unlock(&h->lock); D("-- usb_bulk_read --\n"); return res; } Loading @@ -451,6 +453,7 @@ int usb_write(usb_handle *h, const void *_data, int len) int n; int need_zero = 0; D("++ usb_write ++\n"); if(h->zero_mask) { /* if we need 0-markers and our transfer ** is an even multiple of the packet size, Loading Loading @@ -480,6 +483,7 @@ int usb_write(usb_handle *h, const void *_data, int len) return n; } D("-- usb_write --\n"); return 0; } Loading Loading @@ -554,7 +558,7 @@ void usb_kick(usb_handle *h) int usb_close(usb_handle *h) { D("[ usb close ... ]\n"); D("++ usb close ++\n"); adb_mutex_lock(&usb_lock); h->next->prev = h->prev; h->prev->next = h->next; Loading @@ -562,7 +566,7 @@ int usb_close(usb_handle *h) h->next = 0; adb_close(h->desc); D("[ usb closed %p (fd = %d) ]\n", h, h->desc); D("-- usb closed %p (fd = %d) --\n", h, h->desc); adb_mutex_unlock(&usb_lock); free(h); Loading