-/* --- @id_conn@ --- *
- *
- * Arguments: @int fd@ = file descriptor connected
- * @void *vp@ = pointer to identification block
- *
- * Returns: ---
- *
- * Use: Responds to a completed connection to the remote RFC931
- * server.
- */
-
-static void id_conn(int fd, void *vp)
-{
- id *i = vp;
-
- if (fd == -1) {
- i->state |= S_USER | S_UCONN;
- if (i->state & S_HOST)
- id_done(i);
- } else {
- dstr d = DSTR_INIT;
- dstr_putf(&d, "%u, %u\n",
- ntohs(i->q.rsin.sin_port), ntohs(i->q.lsin.sin_port));
- write(fd, d.buf, d.len);
- dstr_destroy(&d);
- i->state |= S_UCONN;
- selbuf_init(&i->id, sel, fd, id_ident, i);
- }
-}
-