Home | History | Annotate | Download | only in adb

Lines Matching refs:peer

50 ** these have no peer anymore, but still packets to
58 // If |peer_id| is not 0, also check that it is connected to a peer
69 if (peer_id == 0 || (s->peer && s->peer->id == peer_id)) {
118 if (s->transport == t || (s->peer && s->peer->transport == t)) {
215 if (s->peer) {
216 D("LS(%d): closing peer. peer->id=%d peer->fd=%d", s->id, s->peer->id, s->peer->fd);
218 * the peer, this ensures that remote sockets can still get the id
221 if (s->peer->shutdown) {
222 s->peer->shutdown(s->peer);
224 s->peer->peer = nullptr;
225 s->peer->close(s->peer);
226 s->peer = nullptr;
300 ** writable events again and tell our peer
304 s->peer->ready(s->peer);
335 if ((avail == max_payload) || (s->peer == 0)) {
340 // s->peer->enqueue() may call s->close() and free s,
344 r = s->peer->enqueue(s->peer, p);
345 D("LS(%u): fd=%d post peer->enqueue(). r=%d", saved_id, saved_fd, r);
448 D("entered remote_socket_enqueue RS(%d) WRITE fd=%d peer.fd=%d", s->id, s->fd, s->peer->fd);
450 p->msg.arg0 = s->peer->id;
458 D("entered remote_socket_ready RS(%d) OKAY fd=%d peer.fd=%d", s->id, s->fd, s->peer->fd);
461 p->msg.arg0 = s->peer->id;
467 D("entered remote_socket_shutdown RS(%d) CLOSE fd=%d peer->fd=%d", s->id, s->fd,
468 s->peer ? s->peer->fd : -1);
471 if (s->peer) {
472 p->msg.arg0 = s->peer->id;
479 if (s->peer) {
480 s->peer->peer = 0;
481 D("RS(%d) peer->close()ing peer->id=%d peer->fd=%d", s->id, s->peer->id, s->peer->fd);
482 s->peer->close(s->peer);
484 D("entered remote_socket_close RS(%d) CLOSE fd=%d peer->fd=%d", s->id, s->fd,
485 s->peer ? s->peer->fd : -1);
739 if (handle_host_request(service, type, serial, s->peer->fd, s) == 0) {
757 SendFail(s->peer->fd, "unknown host service");
762 ** so we make our peer back into a regular
768 SendOkay(s->peer->fd);
770 s->peer->ready = local_socket_ready;
771 s->peer->shutdown = nullptr;
772 s->peer->close = local_socket_close;
773 s->peer->peer = s2;
774 s2->peer = s->peer;
775 s->peer = 0;
788 SendFail(s->peer->fd, error_msg);
795 SendFail(s->peer->fd, "device offline (no transport)");
801 SendFail(s->peer->fd, "device offline (transport offline)");
805 /* instrument our peer to pass the success or fail
810 s->peer->ready = local_socket_ready_notify;
811 s->peer->shutdown = nullptr;
812 s->peer->close = local_socket_close_notify;
813 s->peer->peer = 0;
815 s->peer->transport = s->transport;
817 connect_to_remote(s->peer, (char*)(p->data + 4));
818 s->peer = 0;
823 /* we're going to close our peer as a side-effect, so
840 if (s->peer) {
841 s->peer->peer = 0;
842 s->peer->close(s->peer);
843 s->peer = 0;
864 s->peer = ss;
865 ss->peer = s;
874 if (peer && peer->transport) {
875 max_payload = std::min(max_payload, peer->transport->get_max_payload());