Changeset 9226 for trunk/ippTools/src/dettool.c
- Timestamp:
- Oct 4, 2006, 12:16:17 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/dettool.c (modified) (25 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r9214 r9226 1 #ifdef HAV E_CONFIG_H1 #ifdef HAVB_CONFIG_H 2 2 #include <config.h> 3 3 #endif … … 160 160 psArray *output = p_psDBFetchResult(config->dbh); 161 161 if (!output) { 162 psError(PS_ERR_UNKNOWN, false, "database error"); 163 return false; 164 } 165 if (!psArrayLength(output)) { 162 166 // XXX check psError here 163 167 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 164 return false; 168 psFree(output); 169 return true; 165 170 } 166 171 … … 768 773 psArray *output = p_psDBFetchResult(config->dbh); 769 774 if (!output) { 775 psError(PS_ERR_UNKNOWN, false, "database error"); 776 return false; 777 } 778 if (!psArrayLength(output)) { 770 779 // XXX check psError here 771 780 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 772 return false; 781 psFree(output); 782 return true; 773 783 } 774 784 … … 823 833 if (!output) { 824 834 psError(PS_ERR_UNKNOWN, false, "database error"); 825 psFree(query);835 return false; 826 836 } 827 837 if (!psArrayLength(output)) { … … 901 911 if (!output) { 902 912 psError(PS_ERR_UNKNOWN, false, "database error"); 903 psFree(query);913 return false; 904 914 } 905 915 if (!psArrayLength(output)) { … … 1186 1196 psArray *output = p_psDBFetchResult(config->dbh); 1187 1197 if (!output) { 1198 psError(PS_ERR_UNKNOWN, false, "database error"); 1199 return false; 1200 } 1201 if (!psArrayLength(output)) { 1188 1202 // XXX check psError here 1189 1203 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 1190 return false; 1204 psFree(output); 1205 return true; 1191 1206 } 1192 1207 … … 1330 1345 psArray *output = p_psDBFetchResult(config->dbh); 1331 1346 if (!output) { 1347 psError(PS_ERR_UNKNOWN, false, "database error"); 1348 return false; 1349 } 1350 psFree(output); 1351 if (!psArrayLength(output)) { 1332 1352 // XXX check psError here 1333 1353 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 1334 return false; 1335 } 1336 psFree(output); 1354 return true; 1355 } 1337 1356 1338 1357 // create a new detProcessedImfile object … … 1484 1503 psArray *output = p_psDBFetchResult(config->dbh); 1485 1504 if (!output) { 1505 psError(PS_ERR_UNKNOWN, false, "database error"); 1506 return false; 1507 } 1508 if (!psArrayLength(output)) { 1486 1509 // XXX check psError here 1487 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 1488 return false; 1510 psError(PS_ERR_UNKNOWN, false, "no stackable detProcessedImfiles found"); 1511 psFree(output); 1512 return true; 1489 1513 } 1490 1514 … … 1541 1565 psArray *output = p_psDBFetchResult(config->dbh); 1542 1566 if (!output) { 1567 psError(PS_ERR_UNKNOWN, false, "database error"); 1568 return false; 1569 } 1570 if (!psArrayLength(output)) { 1543 1571 // XXX check psError here 1544 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 1545 return false; 1572 psError(PS_ERR_UNKNOWN, false, "no detProcessedImfile rows found"); 1573 psFree(output); 1574 return true; 1546 1575 } 1547 1576 … … 1992 2021 psArray *output = p_psDBFetchResult(config->dbh); 1993 2022 if (!output) { 2023 psError(PS_ERR_UNKNOWN, false, "database error"); 2024 return false; 2025 } 2026 if (!psArrayLength(output)) { 1994 2027 // XXX check psError here 1995 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 1996 return false; 2028 psError(PS_ERR_UNKNOWN, false, "no detStackedImfile rows found"); 2029 psFree(output); 2030 return true; 1997 2031 } 1998 2032 … … 2167 2201 psArray *output = p_psDBFetchResult(config->dbh); 2168 2202 if (!output) { 2203 psError(PS_ERR_UNKNOWN, false, "database error"); 2204 return false; 2205 } 2206 if (!psArrayLength(output)) { 2169 2207 // XXX check psError here 2170 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 2171 return false; 2208 psError(PS_ERR_UNKNOWN, false, "no detNormalizedStatImfile rows found"); 2209 psFree(output); 2210 return true; 2172 2211 } 2173 2212 … … 2228 2267 psArray *output = p_psDBFetchResult(config->dbh); 2229 2268 if (!output) { 2269 psError(PS_ERR_UNKNOWN, false, "database error"); 2270 return false; 2271 } 2272 if (!psArrayLength(output)) { 2230 2273 // XXX check psError here 2231 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 2232 return false; 2274 psError(PS_ERR_UNKNOWN, false, "no detStackedImfile rows found"); 2275 psFree(output); 2276 return true; 2233 2277 } 2234 2278 … … 2353 2397 psArray *output = p_psDBFetchResult(config->dbh); 2354 2398 if (!output) { 2399 psError(PS_ERR_UNKNOWN, false, "database error"); 2400 return false; 2401 } 2402 if (!psArrayLength(output)) { 2355 2403 // XXX check psError here 2356 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 2357 return false; 2404 psError(PS_ERR_UNKNOWN, false, "no normalizable detNormalizedStatImfiles found"); 2405 psFree(output); 2406 return true; 2358 2407 } 2359 2408 … … 2555 2604 psArray *output = p_psDBFetchResult(config->dbh); 2556 2605 if (!output) { 2606 psError(PS_ERR_UNKNOWN, false, "database error"); 2607 return false; 2608 } 2609 if (!psArrayLength(output)) { 2557 2610 // XXX check psError here 2558 2611 psError(PS_ERR_UNKNOWN, false, "no pending detNormalizedStatImfile rows found"); 2559 return false; 2612 psFree(output); 2613 return true; 2560 2614 } 2561 2615 … … 2663 2717 if (!output) { 2664 2718 psError(PS_ERR_UNKNOWN, false, "database error"); 2665 psFree(query);2719 return false; 2666 2720 } 2667 2721 if (!psArrayLength(output)) { … … 2811 2865 if (!output) { 2812 2866 psError(PS_ERR_UNKNOWN, false, "database error"); 2813 psFree(query);2867 return false; 2814 2868 } 2815 2869 if (!psArrayLength(output)) { … … 2947 3001 2948 3002 psString query = psStringCopy( 2949 "SELECT "3003 "SELECT DISTINCT" 2950 3004 " detRun.iteration," 2951 3005 " detRun.det_type," 2952 3006 " detProcessedImfile.*," 2953 " detNormalizedImfile.uri ,"3007 " detNormalizedImfile.uri AS det_uri," 2954 3008 " rawDetrendExp.camera" 2955 3009 " FROM detRun" … … 2997 3051 psArray *output = p_psDBFetchResult(config->dbh); 2998 3052 if (!output) { 3053 psError(PS_ERR_UNKNOWN, false, "database error"); 3054 return false; 3055 } 3056 if (!psArrayLength(output)) { 2999 3057 // XXX check psError here 3000 psError(PS_ERR_UNKNOWN, false, "no pending rows found"); 3001 return false; 3058 psError(PS_ERR_UNKNOWN, false, "no residable detNormalizedImfileis found"); 3059 psFree(output); 3060 return true; 3002 3061 } 3003 3062 … … 3300 3359 psArray *output = p_psDBFetchResult(config->dbh); 3301 3360 if (!output) { 3361 psError(PS_ERR_UNKNOWN, false, "database error"); 3362 return false; 3363 } 3364 if (!psArrayLength(output)) { 3302 3365 // XXX check psError here 3303 3366 psError(PS_ERR_UNKNOWN, false, "no pending detNormalizedImfile rows found"); 3304 return false; 3367 psFree(output); 3368 return true; 3305 3369 } 3306 3370 … … 3472 3536 psArray *output = p_psDBFetchResult(config->dbh); 3473 3537 if (!output) { 3538 psError(PS_ERR_UNKNOWN, false, "database error"); 3539 return false; 3540 } 3541 if (!psArrayLength(output)) { 3474 3542 // XXX check psError here 3475 3543 psError(PS_ERR_UNKNOWN, false, "no detResidImfile rows found"); 3476 return false; 3544 psFree(output); 3545 return true; 3477 3546 } 3478 3547 … … 3583 3652 psArray *output = p_psDBFetchResult(config->dbh); 3584 3653 if (!output) { 3654 psError(PS_ERR_UNKNOWN, false, "database error"); 3655 return false; 3656 } 3657 if (!psArrayLength(output)) { 3585 3658 // XXX check psError here 3586 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 3587 return false; 3659 psError(PS_ERR_UNKNOWN, false, "no residExpable detResidImfiles found"); 3660 psFree(output); 3661 return true; 3588 3662 } 3589 3663 … … 3741 3815 psArray *output = p_psDBFetchResult(config->dbh); 3742 3816 if (!output) { 3817 psError(PS_ERR_UNKNOWN, false, "database error"); 3818 return false; 3819 } 3820 if (!psArrayLength(output)) { 3743 3821 // XXX check psError here 3744 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 3745 return false; 3822 psError(PS_ERR_UNKNOWN, false, "no detResidImfile rows found"); 3823 psFree(output); 3824 return true; 3746 3825 } 3747 3826 … … 3996 4075 psArray *output = p_psDBFetchResult(config->dbh); 3997 4076 if (!output) { 4077 psError(PS_ERR_UNKNOWN, false, "database error"); 4078 return false; 4079 } 4080 if (!psArrayLength(output)) { 3998 4081 // XXX check psError here 3999 psError(PS_ERR_UNKNOWN, false, "no pending rawDetrendExp rows found"); 4000 return false; 4082 psError(PS_ERR_UNKNOWN, false, "no completed det runs found"); 4083 psFree(output); 4084 return true; 4001 4085 } 4002 4086 … … 4288 4372 psArray *output = p_psDBFetchResult(config->dbh); 4289 4373 if (!output) { 4374 psError(PS_ERR_UNKNOWN, false, "database error"); 4375 return false; 4376 } 4377 if (!psArrayLength(output)) { 4290 4378 // XXX check psError here 4291 4379 psError(PS_ERR_UNKNOWN, false, "no pending completed detrun iterations found"); 4292 return false; 4380 psFree(output); 4381 return true; 4293 4382 } 4294 4383 … … 4486 4575 psArray *output = p_psDBFetchResult(config->dbh); 4487 4576 if (!output) { 4577 psError(PS_ERR_UNKNOWN, false, "database error"); 4578 return false; 4579 } 4580 if (!psArrayLength(output)) { 4488 4581 // XXX check psError here 4489 4582 psError(PS_ERR_UNKNOWN, false, "no completed detrun iterations found"); 4490 return false; 4583 psFree(output); 4584 return true; 4491 4585 } 4492 4586
Note:
See TracChangeset
for help on using the changeset viewer.
