vavar(int, fd);
vavar(struct sockaddr_storage, name);
int cfd;
+ int pfds[2];
char old;
char *hd, *p;
struct charbuf inbuf, outbuf;
headappheader(req, "X-Ash-Address", inet_ntop(AF_INET6, &((struct sockaddr_in6 *)&name)->sin6_addr, nmbuf, sizeof(nmbuf)));
headappheader(req, "X-Ash-Port", sprintf3("%i", ntohs(((struct sockaddr_in6 *)&name)->sin6_port)));
}
- if((cfd = sendreq(plex, req)) < 0)
+ if(block(plex, EV_WRITE, 60) <= 0)
goto out;
+ if(socketpair(PF_UNIX, SOCK_STREAM, 0, pfds))
+ goto out;
+ if(sendreq(plex, req, pfds[0]))
+ goto out;
+ close(pfds[0]);
+ cfd = pfds[1];
/*
* If there is message data, pass it: