IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 10, 2009, 3:47:42 AM (17 years ago)
Author:
eugene
Message:

adjust dvo locking to allow read-only access to databases in dvo shell

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/Ohana/src/libdvo/src/dvo_image.c

    r24748 r25035  
    44int dvo_image_lock (FITS_DB *db, char *filename, double timeout, int lockstate) {
    55
    6   /* lock the image catalog */
    7   if (!check_file_access (filename, FALSE, TRUE)) return (FALSE);
     6  int READWRITE;
     7
     8  // default access control options:
     9  READWRITE = TRUE;
     10
     11  // in read-only mode, do not backup or require write access
     12  if (lockstate == LCK_SOFT) {
     13    READWRITE = FALSE;
     14  }
     15
     16  // do not perform a backup here
     17  if (!check_file_access (filename, FALSE, READWRITE, TRUE)) return (FALSE);
    818
    919  db[0].lockstate = lockstate;
Note: See TracChangeset for help on using the changeset viewer.