Lines Matching full:serial
156 if (read_packet(fd, t->serial, &p)) {
157 D("%s: failed to read packet from transport socket on fd %d", t->serial, fd);
174 if (write_packet(t->transport_socket, t->serial, &p)) {
197 android::base::StringPrintf("<-%s", (t->serial != nullptr ? t->serial : "transport")));
198 D("%s: starting read_transport thread on fd %d, SYNC online (%d)", t->serial, t->fd,
205 if (write_packet(t->fd, t->serial, &p)) {
207 D("%s: failed to write SYNC packet", t->serial);
211 D("%s: data pump started", t->serial);
219 D("%s: remote read failed for transport", t->serial);
230 D("%s: received remote packet, sending to transport", t->serial);
231 if (write_packet(t->fd, t->serial, &p)) {
233 D("%s: failed to write apacket to transport", t->serial);
238 D("%s: SYNC offline for transport", t->serial);
244 if (write_packet(t->fd, t->serial, &p)) {
246 D("%s: failed to write SYNC apacket to transport", t->serial);
250 D("%s: read_transport thread is exiting", t->serial);
263 android::base::StringPrintf("->%s", (t->serial != nullptr ? t->serial : "transport")));
264 D("%s: starting write_transport thread, reading from fd %d", t->serial, t->fd);
268 if (read_packet(t->fd, t->serial, &p)) {
269 D("%s: failed to read apacket from transport on fd %d", t->serial, t->fd);
275 D("%s: transport SYNC offline", t->serial);
280 D("%s: transport SYNC online", t->serial);
283 D("%s: transport ignoring SYNC %d != %d", t->serial, p->msg.arg1, t->sync_token);
288 D("%s: transport got packet, sending to remote", t->serial);
291 D("%s: remote write failed for transport", t->serial);
296 D("%s: transport ignoring packet while offline", t->serial);
303 D("%s: write_transport thread is exiting, fd %d", t->serial, t->fd);
511 D("transport: %s removing and free'ing %d", t->serial, t->transport_socket);
525 if (t->serial) free(t->serial);
545 D("transport: %s socketpair: (%d,%d) starting", t->serial, s[0], s[1]);
597 D("transport: %s registered", transport->serial);
607 D("transport: %s removed", transport->serial);
620 D("transport: %s unref (kicking and closing)", t->serial);
624 D("transport: %s unref (count=%zu)", t->serial, t->ref_count);
651 atransport* acquire_one_transport(TransportType type, const char* serial, TransportId transport_id,
659 } else if (serial) {
660 *error_out = android::base::StringPrintf("device '%s' not found", serial);
683 } else if (serial) {
684 if (t->MatchesTarget(serial)) {
865 if (serial) {
866 if (target == serial) {
878 // Parse our |serial| and the given |target| to check if the hostnames and ports match.
881 if (android::base::ParseNetAddress(serial, &serial_host, &serial_port, nullptr, &error)) {
922 const char* serial = t->serial;
923 if (!serial || !serial[0]) {
924 serial = "(no serial number)";
928 *result += serial;
932 android::base::StringAppendF(result, "%-22s %s", serial, t->connection_state_name().c_str());
972 int register_socket_transport(int s, const char* serial, int port, int local) {
975 if (!serial) {
978 serial = buf;
981 D("transport: %s init'ing for socket %d, on port %d", serial, s, port);
989 if (transport->serial && strcmp(serial, transport->serial) == 0) {
990 VLOG(TRANSPORT) << "socket transport " << transport->serial
998 if (transport->serial && strcmp(serial, transport->serial) == 0) {
999 VLOG(TRANSPORT) << "socket transport " << transport->serial
1007 t->serial = strdup(serial);
1016 atransport* find_transport(const char* serial) {
1021 if (t->serial && strcmp(serial, t->serial) == 0) {
1045 void register_usb_transport(usb_handle* usb, const char* serial, const char* devpath,
1049 D("transport: %p init'ing for usb_handle %p (sn='%s')", t, usb, serial ? serial : "");
1051 if (serial) {
1052 t->serial = strdup(serial);