Changeset 28856 for trunk/ippTools/src/addtool.c
- Timestamp:
- Aug 5, 2010, 5:38:46 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/addtool.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/addtool.c
r28295 r28856 144 144 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 145 145 146 147 148 // find the cam_id of all the exposures that we want to queue up.149 psString bare_query = pxDataGet("addtool_find_cam_id.sql");150 if (!bare_query) {151 psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");152 psFree(where);153 return false;154 }155 156 146 // prevent queueing an addRun if a given exposure has already been added to 157 147 // the given dvo database 158 148 psString dvodb_string = NULL; 149 psString bare_query = NULL; 159 150 if (dvodb) { 160 // user supplied dvodb 161 psStringAppend(&dvodb_string, "(previous_dvodb = '%s')", dvodb); 151 psTrace("addtool.c", PS_LOG_INFO, "dvodb argument found (%s) using addtool_find_cam_id_dvo.sql\n", dvodb); 152 // find the cam_id of all the exposures that we want to queue up. 153 bare_query = pxDataGet("addtool_find_cam_id_dvo.sql"); 154 // user supplied dvodb 155 psStringAppend(&dvodb_string, "addRun.dvodb = '%s'", dvodb); 162 156 } else { 157 psTrace("addtool.c", PS_LOG_INFO, "dvodb argument not found using addtool_find_cam_id.sql\n"); 158 // find the cam_id of all the exposures that we want to queue up. 159 bare_query = pxDataGet("addtool_find_cam_id.sql"); 163 160 // inherit dvodb from camRun, avoid matching NULL 164 161 psStringAppend(&dvodb_string, "(camRun.dvodb IS NOT NULL AND previous_dvodb = camRun.dvodb)"); 162 } 163 if (!bare_query) { 164 psError(PXTOOLS_ERR_SYS, false, "failed to retrieve SQL statement"); 165 psFree(where); 166 return false; 165 167 } 166 168 // Take the bare query and add the dvodb selector
Note:
See TracChangeset
for help on using the changeset viewer.
