Lines Matching refs:id

57 // Parse the global list of sockets to find one with id |local_id|.
59 // with id |peer_id|. Returns an asocket handle on success, NULL on failure.
66 if (s->id != local_id) {
69 if (peer_id == 0 || (s->peer && s->peer->id == peer_id)) {
88 s->id = local_socket_next_id++;
92 fatal("local socket id overflow");
105 s->id = 0;
126 D("LS(%d): enqueue %d", s->id, p->len);
149 D("LS(%d): not ready, errno=%d: %s", s->id, errno, strerror(errno));
190 D("LS(%d): destroying fde.fd=%d", s->id, s->fde.fd);
199 D("LS(%d): discarding %d bytes", s->id, p->len);
213 D("entered local_socket_close. LS(%d) fd=%d", s->id, s->fd);
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
233 int id = s->id;
235 D("LS(%d): closed", id);
241 D("LS(%d): closing", s->id);
245 D("LS(%d): put on socket_closing_list fd=%d", s->id, s->fd);
252 D("LS(%d): event_func(fd=%d(==%d), ev=%04x)", s->id, s->fd, fd, ev);
317 D("LS(%d): post adb_read(fd=%d,...) r=%d (errno=%d) avail=%zu", s->id, s->fd, r,
333 D("LS(%d): fd=%d post avail loop. r=%d is_eof=%d forced_eof=%d", s->id, s->fd, r, is_eof,
342 unsigned saved_id = s->id;
380 D("LS(%d): FDE_ERROR (fd=%d)", s->id, s->fd);
398 D("LS(%d): created (fd=%d)", s->id, s->fd);
417 D("LS(%d): bound to '%s' via %d", s->id, name, fd);
429 D("LS(%d): enabling exit_on_close", s->id);
444 D("LS(%d) bound to '%s'", s->id, name);
453 D("entered remote_socket_enqueue RS(%d) WRITE fd=%d peer.fd=%d", s->id, s->fd, s->peer->fd);
455 p->msg.arg0 = s->peer->id;
456 p->msg.arg1 = s->id;
463 D("entered remote_socket_ready RS(%d) OKAY fd=%d peer.fd=%d", s->id, s->fd, s->peer->fd);
466 p->msg.arg0 = s->peer->id;
467 p->msg.arg1 = s->id;
472 D("entered remote_socket_shutdown RS(%d) CLOSE fd=%d peer->fd=%d", s->id, s->fd,
477 p->msg.arg0 = s->peer->id;
479 p->msg.arg1 = s->id;
486 D("RS(%d) peer->close()ing peer->id=%d peer->fd=%d", s->id, s->peer->id, s->peer->fd);
489 D("entered remote_socket_close RS(%d) CLOSE fd=%d peer->fd=%d", s->id, s->fd,
491 D("RS(%d): closed", s->id);
496 // |t|. Where |id| is the socket id of the corresponding service on the other
499 asocket* create_remote_socket(unsigned id, atransport* t) {
500 if (id == 0) {
501 fatal("invalid remote socket id (0)");
508 s->id = id;
515 D("RS(%d): created", s->id);
520 D("Connect_to_remote call RS(%d) fd=%d", s->id, s->fd);
528 D("LS(%d): connect('%s')", s->id, destination);
530 p->msg.arg0 = s->id;
658 D("SS(%d): enqueue %d", s->id, p->len);
665 D("SS(%d): overflow", s->id);
684 D("SS(%d): bad size (%d)", s->id, len);
688 D("SS(%d): len is %d", s->id, len);
691 D("SS(%d): waiting for %d more bytes", s->id, len + 4 - p->len);
697 D("SS(%d): '%s'", s->id, (char*)(p->data + 4));
735 D("SS(%d): handled host service '%s'", s->id, service);
739 D("SS(%d): okay transport", s->id);
750 D("SS(%d): couldn't create host service '%s'", s->id, service);
770 D("SS(%d): okay", s->id);
823 D("SS(%d): ready", s->id);
827 D("SS(%d): closed", s->id);
848 D("SS(%d)", s->id);