EPIPE means that writing is impossible, as the pipe is dead
authoraland <aland>
Thu, 3 Jul 2008 13:25:32 +0000 (13:25 +0000)
committeraland <aland>
Thu, 3 Jul 2008 13:25:32 +0000 (13:25 +0000)
src/modules/rlm_otp/otp_pw_valid.c

index a33fefd..79badb6 100644 (file)
@@ -207,9 +207,6 @@ retry:
     return -1;
 
   if ((rc = otp_write(fdp, (const char *) request, sizeof(*request))) != 0) {
-    if (rc == EPIPE)
-      goto retry;      /* otpd disconnect */   /*TODO: pause */
-    else
       return -1;
   }
 
@@ -284,7 +281,7 @@ otp_write(otp_fd_t *fdp, const char *buf, size_t len)
 
   while (nleft) {
     if ((nwrote = write(fdp->fd, &buf[len - nleft], nleft)) == -1) {
-      if (errno == EINTR || errno == EPIPE) {
+      if (errno == EINTR) {
         continue;
       } else {
         (void) radlog(L_ERR, "rlm_otp: %s: write to otpd: %s",