Changeset 21431
- Timestamp:
- Feb 10, 2009, 10:58:17 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/fits/psFits.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/fits/psFits.c
r21117 r21431 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1.8 4$ $Name: not supported by cvs2svn $10 * @date $Date: 2009-0 1-13 21:04:28$9 * @version $Revision: 1.85 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2009-02-10 20:58:17 $ 11 11 * 12 12 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 37 37 #define MAX_STRING_LENGTH 256 // Maximum length string for FITS routines 38 38 39 #define FITS_OPEN_RETRIES 50 // Number of retries to attempt when opening a FITS file 40 #define FITS_OPEN_RETRY_WAIT 200000 // Wait between retries (usec) 39 #define FITS_OPEN_RETRIES 16 // Number of retries to attempt when opening a FITS file 40 #define FITS_OPEN_RETRY_WAIT_MIN 200000 // Wait between retries (usec) first time 41 #define FITS_OPEN_RETRY_WAIT_MAX 5000000 // double wait time up to 5 sec 41 42 42 43 static char *defaultExtword = "EXTNAME"; … … 141 142 psString tmpname = psStringCopy(name); // Copy of filename, since dirname() may modify 142 143 const char *dir = dirname(tmpname); // Directory for file 143 useconds_t waittime = FITS_OPEN_RETRY_WAIT ; // Wait time between retries (usec)144 useconds_t waittime = FITS_OPEN_RETRY_WAIT_MIN; // Wait time between retries (usec) 144 145 145 146 for (int i = 0; (i < FITS_OPEN_RETRIES) && ((dirstat = access(dir, F_OK)) != 0); i++) { … … 162 163 163 164 usleep(waittime); 164 waittime *= 2; 165 // double waittime until we get to the max value 166 if (waittime < FITS_OPEN_RETRY_WAIT_MAX) { 167 waittime *= 2; 168 } 165 169 } 166 170 if (dirstat != 0) {
Note:
See TracChangeset
for help on using the changeset viewer.
