Changeset 15091 for trunk/ippTools/src/pzgetexp.c
- Timestamp:
- Sep 28, 2007, 2:52:00 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/pzgetexp.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/pzgetexp.c
r14023 r15091 68 68 { 69 69 PS_ASSERT_PTR_NON_NULL(config, NULL); 70 71 bool status = false; 72 psString camera = psMetadataLookupStr(&status, config->args, "-inst"); 73 if (!status) { 74 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -inst"); 75 return false; 76 } 77 if (!camera) { 78 psError(PS_ERR_UNKNOWN, true, "-inst is required"); 79 return false; 80 } 81 82 psString telescope = psMetadataLookupStr(&status, config->args, "-telescope"); 83 if (!status) { 84 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -telescope"); 85 return false; 86 } 87 if (!telescope) { 88 psError(PS_ERR_UNKNOWN, true, "-telescope is required"); 89 return false; 90 } 91 70 92 // find last fileset/exp_name (if we have one) 71 93 bool haveLastFileSet = false; 72 94 psString lastFileSet = NULL; 73 95 { 74 char *query = "SELECT * from summitExp ORDER BY dateobs DESC LIMIT 1";75 if (!p_psDBRunQuery(config->dbh, query )) {96 char *query = "SELECT * from summitExp WHERE camera = \"%s\" and TELESCOPE = \"%s\" ORDER BY dateobs DESC LIMIT 1"; 97 if (!p_psDBRunQuery(config->dbh, query, camera, telescope)) { 76 98 psError(PS_ERR_UNKNOWN, false, "database error"); 77 99 return false; … … 97 119 // invoke dsproductls 98 120 // dsproductls --uri <> --last_fileset <> 99 bool status = false;100 121 psString uri = psMetadataLookupStr(&status, config->args, "-uri"); 101 122 psString cmd = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.
