Changeset 8427 for trunk/Ohana/src/opihi/dvo/dmags.c
- Timestamp:
- Aug 20, 2006, 5:36:41 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/dmags.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/dmags.c
r7917 r8427 58 58 /* lock, load, unlock catalog */ 59 59 catalog.filename = skylist[0].filename[j]; 60 switch (lock_catalog (&catalog, LCK_SOFT)) { 61 case 2: 62 unlock_catalog (&catalog); 63 case 0: 64 continue; 60 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF; 61 62 // an error exit status here is a significant error 63 if (!dvo_catalog_open (&catalog, NULL, FALSE, "r")) { 64 fprintf (stderr, "ERROR: failure to open catalog file %s\n", catalog.filename); 65 exit (2); 65 66 } 66 catalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_SECF; 67 if (!load_catalog (&catalog, FALSE)) { 68 unlock_catalog (&catalog); 69 continue; 70 } 71 unlock_catalog (&catalog); 67 dvo_catalog_unlock (&catalog); 72 68 73 69 /* get correct mags, convert to X,Y */ … … 108 104 if (M3 != NULL) free (M3); 109 105 } 110 if (catalog.average != NULL) free (catalog.average); 111 if (catalog.secfilt != NULL) free (catalog.secfilt); 112 if (catalog.measure != NULL) free (catalog.measure); 113 catalog.average = (Average *) NULL; 114 catalog.secfilt = (SecFilt *) NULL; 115 catalog.measure = (Measure *) NULL; 106 dvo_catalog_free (&catalog); 116 107 } 117 108 … … 131 122 escape: 132 123 SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL))); 133 if (catalog.average != NULL) free (catalog.average); 134 if (catalog.secfilt != NULL) free (catalog.secfilt); 135 if (catalog.measure != NULL) free (catalog.measure); 124 dvo_catalog_free (&catalog); 136 125 if (RegionName != NULL) free (RegionName); 137 126 if (RegionList != NULL) free (RegionList);
Note:
See TracChangeset
for help on using the changeset viewer.
