Index: trunk/psLib/src/fits/psFits.c
===================================================================
--- trunk/psLib/src/fits/psFits.c	(revision 21116)
+++ trunk/psLib/src/fits/psFits.c	(revision 21117)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.83 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2009-01-13 20:53:38 $
+ *  @version $Revision: 1.84 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-01-13 21:04:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -35,7 +35,7 @@
 #include "psFitsFloat.h"
 
-#define MAX_STRING_LENGTH 256  // maximum length string for FITS routines
-
-#define FITS_OPEN_RETRIES 5             // Number of retries to attempt when opening a FITS file
+#define MAX_STRING_LENGTH 256           // Maximum length string for FITS routines
+
+#define FITS_OPEN_RETRIES 50            // Number of retries to attempt when opening a FITS file
 #define FITS_OPEN_RETRY_WAIT 200000     // Wait between retries (usec)
 
@@ -50,5 +50,5 @@
     va_list ap;
     va_start(ap, message);
-    p_psErrorV (filename, lineno, func, PS_ERR_BAD_FITS, true, message, ap);
+    p_psErrorV(filename, lineno, func, PS_ERR_BAD_FITS, true, message, ap);
     va_end(ap);
 
@@ -65,9 +65,11 @@
     char fitsErr[MAX_STRING_LENGTH];
 
-    if (status == 0) return PS_ERR_NONE;
+    if (status == 0) {
+        return PS_ERR_NONE;
+    }
 
     va_list ap;                         // Variable arguments
     va_start(ap, errorMsg);
-    psErrorV (PS_ERR_IO, new, errorMsg, ap);
+    psErrorV(PS_ERR_IO, new, errorMsg, ap);
     va_end(ap);
 
@@ -138,6 +140,6 @@
     int dirstat = 0;                    // Status of directory access
     psString tmpname = psStringCopy(name); // Copy of filename, since dirname() may modify
-    const char *dir = dirname(tmpname);
-    useconds_t waittime = FITS_OPEN_RETRY_WAIT;
+    const char *dir = dirname(tmpname); // Directory for file
+    useconds_t waittime = FITS_OPEN_RETRY_WAIT; // Wait time between retries (usec)
 
     for (int i = 0; (i < FITS_OPEN_RETRIES) && ((dirstat = access(dir, F_OK)) != 0); i++) {
