- Timestamp:
- Jun 19, 2012, 5:24:19 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Ohana/src/dvomerge/src/dvomergeImageIDs.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/Ohana/src/dvomerge/src/dvomergeImageIDs.c
r29938 r34041 1 1 # include "dvomerge.h" 2 2 3 /*** update theimage table ***/3 /*** generate the IDmap for the given databases, and update the output image table ***/ 4 4 int dvomergeImagesUpdate (IDmapType *IDmap, char *input, char *output) { 5 5 … … 12 12 inDB.mode = dvo_catalog_catmode (CATMODE); 13 13 inDB.format = dvo_catalog_catformat (CATFORMAT); 14 status = dvo_image_lock (&inDB, ImageCat, 3600.0, LCK_ XCLD); // shorter timeout?14 status = dvo_image_lock (&inDB, ImageCat, 3600.0, LCK_SOFT); // shorter timeout? 15 15 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", inDB.filename); 16 16 17 17 // load the image table 18 18 if (inDB.dbstate == LCK_EMPTY) { 19 dvo_image_unlock (&inDB); // unlock input 19 20 IDmap->Nmap = 0; 20 21 return TRUE; … … 52 53 } 53 54 54 /*** update the image table***/55 /*** generate the map for the given 2 databases ***/ 55 56 int dvomergeImagesGetMap (IDmapType *IDmap, char *input, char *output) { 56 57 … … 63 64 inDB.mode = dvo_catalog_catmode (CATMODE); 64 65 inDB.format = dvo_catalog_catformat (CATFORMAT); 65 status = dvo_image_lock (&inDB, ImageCat, 3600.0, LCK_XCLD); // shorter timeout?66 status = dvo_image_lock (&inDB, ImageCat, 5400.0, LCK_XCLD); // shorter timeout? 66 67 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", inDB.filename); 67 68 68 69 // load the image table 69 70 if (inDB.dbstate == LCK_EMPTY) { 71 dvo_image_unlock (&inDB); // unlock input 70 72 IDmap->Nmap = 0; 71 73 return TRUE; … … 76 78 Shutdown ("can't read input image catalog %s", inDB.filename); 77 79 } 80 dvo_image_unlock (&inDB); // unlock input 78 81 79 82 /*** load output/Images.dat ***/ … … 81 84 outDB.mode = dvo_catalog_catmode (CATMODE); 82 85 outDB.format = dvo_catalog_catformat (CATFORMAT); 83 status = dvo_image_lock (&outDB, ImageCat, 3600.0, LCK_XCLD); // shorter timeout?86 status = dvo_image_lock (&outDB, ImageCat, 5400.0, LCK_XCLD); // shorter timeout? 84 87 if (!status) Shutdown ("ERROR: failure to lock image catalog %s", outDB.filename); 85 88 86 89 /* load the image table */ 87 90 if (outDB.dbstate == LCK_EMPTY) { 88 Shutdown (" only use -continue for an existing, partially merged database");91 Shutdown ("for dvomerge -continue or dvomerge_client, the output database must exist"); 89 92 } 90 93 if (!dvo_image_load (&outDB, VERBOSE, TRUE)) { 91 94 Shutdown ("can't read output image catalog %s", outDB.filename); 92 95 } 96 dvo_image_unlock (&outDB); // unlock output 93 97 94 98 // convert database table to internal structure & add to output image db 95 99 dvo_image_match_dbs(IDmap, &outDB, &inDB); 96 dvo_image_unlock (&inDB); // unlock input97 dvo_image_unlock (&outDB); // unlock output98 100 99 101 return TRUE;
Note:
See TracChangeset
for help on using the changeset viewer.
