Home | History | Annotate | Download | only in adb

Lines Matching defs:serial

198         if (read_packet(fd, t->serial, &p)) {
199 D("%s: failed to read packet from transport socket on fd %d", t->serial, fd);
222 if (write_packet(t->transport_socket, t->serial, &p)) {
245 android::base::StringPrintf("<-%s", (t->serial != nullptr ? t->serial : "transport")));
246 D("%s: starting read_transport thread on fd %d, SYNC online (%d)", t->serial, t->fd,
254 if (write_packet(t->fd, t->serial, &p)) {
256 D("%s: failed to write SYNC packet", t->serial);
260 D("%s: data pump started", t->serial);
268 D("%s: remote read failed for transport", t->serial);
274 D("%s: remote read: bad header", t->serial);
287 D("%s: received remote packet, sending to transport", t->serial);
288 if (write_packet(t->fd, t->serial, &p)) {
290 D("%s: failed to write apacket to transport", t->serial);
295 D("%s: SYNC offline for transport", t->serial);
301 if (write_packet(t->fd, t->serial, &p)) {
303 D("%s: failed to write SYNC apacket to transport", t->serial);
307 D("%s: read_transport thread is exiting", t->serial);
320 android::base::StringPrintf("->%s", (t->serial != nullptr ? t->serial : "transport")));
321 D("%s: starting write_transport thread, reading from fd %d", t->serial, t->fd);
325 if (read_packet(t->fd, t->serial, &p)) {
326 D("%s: failed to read apacket from transport on fd %d", t->serial, t->fd);
332 D("%s: transport SYNC offline", t->serial);
337 D("%s: transport SYNC online", t->serial);
340 D("%s: transport ignoring SYNC %d != %d", t->serial, p->msg.arg1, t->sync_token);
345 D("%s: transport got packet, sending to remote", t->serial);
355 D("%s: remote write failed for transport", t->serial);
360 D("%s: transport ignoring packet while offline", t->serial);
367 D("%s: write_transport thread is exiting, fd %d", t->serial, t->fd);
578 D("transport: %s removing and free'ing %d", t->serial, t->transport_socket);
592 if (t->serial) free(t->serial);
612 D("transport: %s socketpair: (%d,%d) starting", t->serial, s[0], s[1]);
664 D("transport: %s registered", transport->serial);
674 D("transport: %s removed", transport->serial);
687 D("transport: %s unref (kicking and closing)", t->serial);
691 D("transport: %s unref (count=%zu)", t->serial, t->ref_count);
718 atransport* acquire_one_transport(TransportType type, const char* serial, TransportId transport_id,
726 } else if (serial) {
727 *error_out = android::base::StringPrintf("device '%s' not found", serial);
750 } else if (serial) {
751 if (t->MatchesTarget(serial)) {
821 D("kicking transport %s", this->serial);
932 if (serial) {
933 if (target == serial) {
945 // Parse our |serial| and the given |target| to check if the hostnames and ports match.
948 if (android::base::ParseNetAddress(serial, &serial_host, &serial_port, nullptr, &error)) {
989 const char* serial = t->serial;
990 if (!serial || !serial[0]) {
991 serial = "(no serial number)";
995 *result += serial;
999 android::base::StringAppendF(result, "%-22s %s", serial, t->connection_state_name().c_str());
1022 return strcmp(x->serial, y->serial) < 0;
1047 int register_socket_transport(int s, const char* serial, int port, int local) {
1050 if (!serial) {
1053 serial = buf;
1056 D("transport: %s init'ing for socket %d, on port %d", serial, s, port);
1064 if (transport->serial && strcmp(serial, transport->serial) == 0) {
1065 VLOG(TRANSPORT) << "socket transport " << transport->serial
1073 if (transport->serial && strcmp(serial, transport->serial) == 0) {
1074 VLOG(TRANSPORT) << "socket transport " << transport->serial
1082 t->serial = strdup(serial);
1091 atransport* find_transport(const char* serial) {
1096 if (t->serial && strcmp(serial, t->serial) == 0) {
1120 void register_usb_transport(usb_handle* usb, const char* serial, const char* devpath,
1124 D("transport: %p init'ing for usb_handle %p (sn='%s')", t, usb, serial ? serial : "");
1126 if (serial) {
1127 t->serial = strdup(serial);