Changeset 9232 for trunk/ippTools/src/regtool.c
- Timestamp:
- Oct 4, 2006, 12:36:22 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/regtool.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/regtool.c
r9189 r9232 71 71 char *query = 72 72 "SELECT newExp.*" 73 " FROM newExp"73 " FROM newExp" 74 74 " LEFT JOIN newImfile USING(exp_tag)" 75 75 " LEFT JOIN rawScienceExp USING(exp_tag)" … … 91 91 psArray *output = p_psDBFetchResult(config->dbh); 92 92 if (!output) { 93 psError(PS_ERR_UNKNOWN, false, "database error"); 94 return false; 95 } 96 if (!psArrayLength(output)) { 93 97 // XXX check psError here 94 psError(PS_ERR_UNKNOWN, false, "failed to fetch the database result"); 95 return false; 98 psError(PS_ERR_UNKNOWN, false, "no pending newExp rows found"); 99 psFree(output); 100 return true; 96 101 } 97 102 … … 144 149 psArray *output = p_psDBFetchResult(config->dbh); 145 150 if (!output) { 151 psError(PS_ERR_UNKNOWN, false, "database error"); 152 return false; 153 } 154 if (!psArrayLength(output)) { 146 155 // XXX check psError here 147 psError(PS_ERR_UNKNOWN, false, "failed to fetch the database result"); 148 return false; 156 psError(PS_ERR_UNKNOWN, false, "no pending newImfile rows found"); 157 psFree(output); 158 return true; 149 159 } 150 160 … … 183 193 psString query = psStringCopy( 184 194 "SELECT newExp.*" 185 " FROM newExp"195 " FROM newExp" 186 196 " LEFT JOIN newImfile USING(exp_tag)" 187 197 " LEFT JOIN rawScienceExp USING(exp_tag)" … … 218 228 psArray *output = p_psDBFetchResult(config->dbh); 219 229 if (!output) { 230 psError(PS_ERR_UNKNOWN, false, "database error"); 231 return false; 232 } 233 if (!psArrayLength(output)) { 220 234 // XXX check psError here 221 psError(PS_ERR_UNKNOWN, false, "failed to fetch the database result"); 235 psError(PS_ERR_UNKNOWN, false, "no pending newExp rows found"); 236 psFree(output); 222 237 return false; 223 238 } … … 510 525 psFree(query); 511 526 512 psArray *newImfiles = p_psDBFetchResult(config->dbh); 513 if (!newImfiles) { 527 psArray *output = p_psDBFetchResult(config->dbh); 528 if (!output) { 529 psError(PS_ERR_UNKNOWN, false, "database error"); 530 return false; 531 } 532 if (!psArrayLength(output)) { 514 533 // XXX check psError here 515 psError(PS_ERR_UNKNOWN, false, "failed to fetch the database result"); 534 psError(PS_ERR_UNKNOWN, false, "no pending newImfile rows found"); 535 psFree(output); 516 536 return false; 517 537 }
Note:
See TracChangeset
for help on using the changeset viewer.
