-
- current_state = "Waiting to connect with caller";
-
- while (connect(sockt, &response.addr, sizeof(response.addr)) != 0) {
+ current_state = "Waiting to connect with caller";
+ do {
+ if (rp->addr.sa_family != AF_INET)
+ p_error("Response uses invalid network address");
+ errno = 0;
+ if (connect(sockt, &rp->addr, sizeof (rp->addr)) != -1)
+ return (1);
+ } while (errno == EINTR);