Fix call to otp_write
authorAlan T. DeKok <aland@freeradius.org>
Fri, 8 Oct 2010 07:28:08 +0000 (09:28 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 8 Oct 2010 14:58:00 +0000 (16:58 +0200)
src/modules/rlm_otp/otp_pw_valid.c

index 204e20f..914b6e9 100644 (file)
@@ -206,7 +206,8 @@ retry:
   if (!fdp || fdp->fd == -1)
     return -1;
 
-  if ((rc = otp_write(fdp, (const char *) request, sizeof(*request))) != sizeof(*request)) {    if (rc == 0)
+  if ((rc = otp_write(fdp, (const char *) request, sizeof(*request))) != sizeof(*request)) {
+    if (rc == 0)
       goto retry;      /* otpd disconnect */   /*TODO: pause */
     else
       return -1;