Changeset 12061
- Timestamp:
- Feb 26, 2007, 1:56:44 PM (19 years ago)
- Location:
- trunk/ippdb
- Files:
-
- 8 edited
-
configure.ac (modified) (1 diff)
-
src/ippdb.c (modified) (88 diffs)
-
src/ippdb.h (modified) (27 diffs)
-
tests/alloc.c (modified) (18 diffs)
-
tests/insert.c (modified) (5 diffs)
-
tests/insertobject.c (modified) (9 diffs)
-
tests/metadatafromobject.c (modified) (18 diffs)
-
tests/objectfrommetadata.c (modified) (18 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/configure.ac
r12033 r12061 7 7 AC_PREREQ(2.59) 8 8 9 AC_INIT([ippdb], [1.1.1 2], [pan-starrs.ifa.hawaii.edu])9 AC_INIT([ippdb], [1.1.13], [pan-starrs.ifa.hawaii.edu]) 10 10 AC_CONFIG_SRCDIR([ippdb.pc.in]) 11 11 -
trunk/ippdb/src/ippdb.c
r12033 r12061 6709 6709 static void chipProcessedImfileRowFree(chipProcessedImfileRow *object); 6710 6710 6711 chipProcessedImfileRow *chipProcessedImfileRowAlloc(const char *exp_tag, psS32 chip_version, psS32 guide_version, const char *class_id, const char *recipe, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, psS16 fault)6711 chipProcessedImfileRow *chipProcessedImfileRowAlloc(const char *exp_tag, psS32 chip_version, psS32 guide_version, const char *class_id, const char *recipe, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 6712 6712 { 6713 6713 chipProcessedImfileRow *_object; … … 6725 6725 _object->bg_stdev = bg_stdev; 6726 6726 _object->bg_mean_stdev = bg_mean_stdev; 6727 _object->b1_uri = psStringCopy(b1_uri); 6728 _object->b2_uri = psStringCopy(b2_uri); 6727 _object->path_base = psStringCopy(path_base); 6729 6728 _object->fault = fault; 6730 6729 … … 6738 6737 psFree(object->recipe); 6739 6738 psFree(object->uri); 6740 psFree(object->b1_uri); 6741 psFree(object->b2_uri); 6739 psFree(object->path_base); 6742 6740 } 6743 6741 … … 6790 6788 return false; 6791 6789 } 6792 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, "255")) { 6793 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 6794 psFree(md); 6795 return false; 6796 } 6797 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, "255")) { 6798 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 6790 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, "255")) { 6791 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 6799 6792 psFree(md); 6800 6793 return false; … … 6818 6811 } 6819 6812 6820 bool chipProcessedImfileInsert(psDB * dbh, const char *exp_tag, psS32 chip_version, psS32 guide_version, const char *class_id, const char *recipe, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, psS16 fault)6813 bool chipProcessedImfileInsert(psDB * dbh, const char *exp_tag, psS32 chip_version, psS32 guide_version, const char *class_id, const char *recipe, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 6821 6814 { 6822 6815 psMetadata *md = psMetadataAlloc(); … … 6866 6859 return false; 6867 6860 } 6868 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, b1_uri)) { 6869 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 6870 psFree(md); 6871 return false; 6872 } 6873 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) { 6874 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 6861 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) { 6862 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 6875 6863 psFree(md); 6876 6864 return false; … … 6904 6892 bool chipProcessedImfileInsertObject(psDB *dbh, chipProcessedImfileRow *object) 6905 6893 { 6906 return chipProcessedImfileInsert(dbh, object->exp_tag, object->chip_version, object->guide_version, object->class_id, object->recipe, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object-> b1_uri, object->b2_uri, object->fault);6894 return chipProcessedImfileInsert(dbh, object->exp_tag, object->chip_version, object->guide_version, object->class_id, object->recipe, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->path_base, object->fault); 6907 6895 } 6908 6896 … … 7022 7010 return false; 7023 7011 } 7024 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, object->b1_uri)) { 7025 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 7026 psFree(md); 7027 return false; 7028 } 7029 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, object->b2_uri)) { 7030 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 7012 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, object->path_base)) { 7013 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 7031 7014 psFree(md); 7032 7015 return false; … … 7091 7074 return false; 7092 7075 } 7093 char* b1_uri = psMetadataLookupPtr(&status, md, "b1_uri"); 7094 if (!status) { 7095 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b1_uri"); 7096 return false; 7097 } 7098 char* b2_uri = psMetadataLookupPtr(&status, md, "b2_uri"); 7099 if (!status) { 7100 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b2_uri"); 7076 char* path_base = psMetadataLookupPtr(&status, md, "path_base"); 7077 if (!status) { 7078 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item path_base"); 7101 7079 return false; 7102 7080 } … … 7107 7085 } 7108 7086 7109 return chipProcessedImfileRowAlloc(exp_tag, chip_version, guide_version, class_id, recipe, uri, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, fault);7087 return chipProcessedImfileRowAlloc(exp_tag, chip_version, guide_version, class_id, recipe, uri, bg, bg_stdev, bg_mean_stdev, path_base, fault); 7110 7088 } 7111 7089 psArray *chipProcessedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 7601 7579 static void camProcessedExpRowFree(camProcessedExpRow *object); 7602 7580 7603 camProcessedExpRow *camProcessedExpRowAlloc(const char *exp_tag, psS32 cam_version, psS32 chip_version, const char *label, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char * b1_uri, const char *b2_uri, psF32 zp_mean, psF32 zp_stdev, psS16 fault, const char *expgroup, const char *dvodb)7581 camProcessedExpRow *camProcessedExpRowAlloc(const char *exp_tag, psS32 cam_version, psS32 chip_version, const char *label, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *path_base, psF32 zp_mean, psF32 zp_stdev, psS16 fault, const char *expgroup, const char *dvodb) 7604 7582 { 7605 7583 camProcessedExpRow *_object; … … 7620 7598 _object->sigma_dec = sigma_dec; 7621 7599 _object->nastro = nastro; 7622 _object->b1_uri = psStringCopy(b1_uri); 7623 _object->b2_uri = psStringCopy(b2_uri); 7600 _object->path_base = psStringCopy(path_base); 7624 7601 _object->zp_mean = zp_mean; 7625 7602 _object->zp_stdev = zp_stdev; … … 7637 7614 psFree(object->uri); 7638 7615 psFree(object->recipe); 7639 psFree(object->b1_uri); 7640 psFree(object->b2_uri); 7616 psFree(object->path_base); 7641 7617 psFree(object->expgroup); 7642 7618 psFree(object->dvodb); … … 7706 7682 return false; 7707 7683 } 7708 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, "255")) { 7709 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 7710 psFree(md); 7711 return false; 7712 } 7713 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, "255")) { 7714 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 7684 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, "255")) { 7685 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 7715 7686 psFree(md); 7716 7687 return false; … … 7754 7725 } 7755 7726 7756 bool camProcessedExpInsert(psDB * dbh, const char *exp_tag, psS32 cam_version, psS32 chip_version, const char *label, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char * b1_uri, const char *b2_uri, psF32 zp_mean, psF32 zp_stdev, psS16 fault, const char *expgroup, const char *dvodb)7727 bool camProcessedExpInsert(psDB * dbh, const char *exp_tag, psS32 cam_version, psS32 chip_version, const char *label, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF32 sigma_ra, psF32 sigma_dec, psS32 nastro, const char *path_base, psF32 zp_mean, psF32 zp_stdev, psS16 fault, const char *expgroup, const char *dvodb) 7757 7728 { 7758 7729 psMetadata *md = psMetadataAlloc(); … … 7817 7788 return false; 7818 7789 } 7819 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, b1_uri)) { 7820 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 7821 psFree(md); 7822 return false; 7823 } 7824 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) { 7825 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 7790 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) { 7791 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 7826 7792 psFree(md); 7827 7793 return false; … … 7875 7841 bool camProcessedExpInsertObject(psDB *dbh, camProcessedExpRow *object) 7876 7842 { 7877 return camProcessedExpInsert(dbh, object->exp_tag, object->cam_version, object->chip_version, object->label, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->sigma_ra, object->sigma_dec, object->nastro, object-> b1_uri, object->b2_uri, object->zp_mean, object->zp_stdev, object->fault, object->expgroup, object->dvodb);7843 return camProcessedExpInsert(dbh, object->exp_tag, object->cam_version, object->chip_version, object->label, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->sigma_ra, object->sigma_dec, object->nastro, object->path_base, object->zp_mean, object->zp_stdev, object->fault, object->expgroup, object->dvodb); 7878 7844 } 7879 7845 … … 8008 7974 return false; 8009 7975 } 8010 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, object->b1_uri)) { 8011 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 8012 psFree(md); 8013 return false; 8014 } 8015 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, object->b2_uri)) { 8016 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 7976 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, object->path_base)) { 7977 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 8017 7978 psFree(md); 8018 7979 return false; … … 8112 8073 return false; 8113 8074 } 8114 char* b1_uri = psMetadataLookupPtr(&status, md, "b1_uri"); 8115 if (!status) { 8116 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b1_uri"); 8117 return false; 8118 } 8119 char* b2_uri = psMetadataLookupPtr(&status, md, "b2_uri"); 8120 if (!status) { 8121 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b2_uri"); 8075 char* path_base = psMetadataLookupPtr(&status, md, "path_base"); 8076 if (!status) { 8077 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item path_base"); 8122 8078 return false; 8123 8079 } … … 8148 8104 } 8149 8105 8150 return camProcessedExpRowAlloc(exp_tag, cam_version, chip_version, label, uri, recipe, bg, bg_stdev, bg_mean_stdev, sigma_ra, sigma_dec, nastro, b1_uri, b2_uri, zp_mean, zp_stdev, fault, expgroup, dvodb);8106 return camProcessedExpRowAlloc(exp_tag, cam_version, chip_version, label, uri, recipe, bg, bg_stdev, bg_mean_stdev, sigma_ra, sigma_dec, nastro, path_base, zp_mean, zp_stdev, fault, expgroup, dvodb); 8151 8107 } 8152 8108 psArray *camProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 9704 9660 static void detProcessedImfileRowFree(detProcessedImfileRow *object); 9705 9661 9706 detProcessedImfileRow *detProcessedImfileRowAlloc(psS32 det_id, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, psS16 fault)9662 detProcessedImfileRow *detProcessedImfileRowAlloc(psS32 det_id, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 9707 9663 { 9708 9664 detProcessedImfileRow *_object; … … 9719 9675 _object->bg_stdev = bg_stdev; 9720 9676 _object->bg_mean_stdev = bg_mean_stdev; 9721 _object->b1_uri = psStringCopy(b1_uri); 9722 _object->b2_uri = psStringCopy(b2_uri); 9677 _object->path_base = psStringCopy(path_base); 9723 9678 _object->fault = fault; 9724 9679 … … 9732 9687 psFree(object->uri); 9733 9688 psFree(object->recipe); 9734 psFree(object->b1_uri); 9735 psFree(object->b2_uri); 9689 psFree(object->path_base); 9736 9690 } 9737 9691 … … 9779 9733 return false; 9780 9734 } 9781 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, "255")) { 9782 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 9783 psFree(md); 9784 return false; 9785 } 9786 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, "255")) { 9787 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 9735 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, "255")) { 9736 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 9788 9737 psFree(md); 9789 9738 return false; … … 9807 9756 } 9808 9757 9809 bool detProcessedImfileInsert(psDB * dbh, psS32 det_id, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, psS16 fault)9758 bool detProcessedImfileInsert(psDB * dbh, psS32 det_id, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 9810 9759 { 9811 9760 psMetadata *md = psMetadataAlloc(); … … 9850 9799 return false; 9851 9800 } 9852 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, b1_uri)) { 9853 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 9854 psFree(md); 9855 return false; 9856 } 9857 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) { 9858 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 9801 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) { 9802 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 9859 9803 psFree(md); 9860 9804 return false; … … 9888 9832 bool detProcessedImfileInsertObject(psDB *dbh, detProcessedImfileRow *object) 9889 9833 { 9890 return detProcessedImfileInsert(dbh, object->det_id, object->exp_tag, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object-> b1_uri, object->b2_uri, object->fault);9834 return detProcessedImfileInsert(dbh, object->det_id, object->exp_tag, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->path_base, object->fault); 9891 9835 } 9892 9836 … … 10001 9945 return false; 10002 9946 } 10003 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, object->b1_uri)) { 10004 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 10005 psFree(md); 10006 return false; 10007 } 10008 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, object->b2_uri)) { 10009 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 9947 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, object->path_base)) { 9948 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 10010 9949 psFree(md); 10011 9950 return false; … … 10065 10004 return false; 10066 10005 } 10067 char* b1_uri = psMetadataLookupPtr(&status, md, "b1_uri"); 10068 if (!status) { 10069 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b1_uri"); 10070 return false; 10071 } 10072 char* b2_uri = psMetadataLookupPtr(&status, md, "b2_uri"); 10073 if (!status) { 10074 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b2_uri"); 10006 char* path_base = psMetadataLookupPtr(&status, md, "path_base"); 10007 if (!status) { 10008 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item path_base"); 10075 10009 return false; 10076 10010 } … … 10081 10015 } 10082 10016 10083 return detProcessedImfileRowAlloc(det_id, exp_tag, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, fault);10017 return detProcessedImfileRowAlloc(det_id, exp_tag, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, path_base, fault); 10084 10018 } 10085 10019 psArray *detProcessedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 10193 10127 static void detProcessedExpRowFree(detProcessedExpRow *object); 10194 10128 10195 detProcessedExpRow *detProcessedExpRowAlloc(psS32 det_id, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, psS16 fault)10129 detProcessedExpRow *detProcessedExpRowAlloc(psS32 det_id, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 10196 10130 { 10197 10131 detProcessedExpRow *_object; … … 10206 10140 _object->bg_stdev = bg_stdev; 10207 10141 _object->bg_mean_stdev = bg_mean_stdev; 10208 _object->b1_uri = psStringCopy(b1_uri); 10209 _object->b2_uri = psStringCopy(b2_uri); 10142 _object->path_base = psStringCopy(path_base); 10210 10143 _object->fault = fault; 10211 10144 … … 10217 10150 psFree(object->exp_tag); 10218 10151 psFree(object->recipe); 10219 psFree(object->b1_uri); 10220 psFree(object->b2_uri); 10152 psFree(object->path_base); 10221 10153 } 10222 10154 … … 10254 10186 return false; 10255 10187 } 10256 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, "255")) { 10257 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 10258 psFree(md); 10259 return false; 10260 } 10261 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, "255")) { 10262 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 10188 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, "255")) { 10189 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 10263 10190 psFree(md); 10264 10191 return false; … … 10282 10209 } 10283 10210 10284 bool detProcessedExpInsert(psDB * dbh, psS32 det_id, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, psS16 fault)10211 bool detProcessedExpInsert(psDB * dbh, psS32 det_id, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 10285 10212 { 10286 10213 psMetadata *md = psMetadataAlloc(); … … 10315 10242 return false; 10316 10243 } 10317 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, b1_uri)) { 10318 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 10319 psFree(md); 10320 return false; 10321 } 10322 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) { 10323 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 10244 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) { 10245 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 10324 10246 psFree(md); 10325 10247 return false; … … 10353 10275 bool detProcessedExpInsertObject(psDB *dbh, detProcessedExpRow *object) 10354 10276 { 10355 return detProcessedExpInsert(dbh, object->det_id, object->exp_tag, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object-> b1_uri, object->b2_uri, object->fault);10277 return detProcessedExpInsert(dbh, object->det_id, object->exp_tag, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->path_base, object->fault); 10356 10278 } 10357 10279 … … 10456 10378 return false; 10457 10379 } 10458 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, object->b1_uri)) { 10459 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 10460 psFree(md); 10461 return false; 10462 } 10463 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, object->b2_uri)) { 10464 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 10380 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, object->path_base)) { 10381 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 10465 10382 psFree(md); 10466 10383 return false; … … 10510 10427 return false; 10511 10428 } 10512 char* b1_uri = psMetadataLookupPtr(&status, md, "b1_uri"); 10513 if (!status) { 10514 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b1_uri"); 10515 return false; 10516 } 10517 char* b2_uri = psMetadataLookupPtr(&status, md, "b2_uri"); 10518 if (!status) { 10519 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b2_uri"); 10429 char* path_base = psMetadataLookupPtr(&status, md, "path_base"); 10430 if (!status) { 10431 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item path_base"); 10520 10432 return false; 10521 10433 } … … 10526 10438 } 10527 10439 10528 return detProcessedExpRowAlloc(det_id, exp_tag, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, fault);10440 return detProcessedExpRowAlloc(det_id, exp_tag, recipe, bg, bg_stdev, bg_mean_stdev, path_base, fault); 10529 10441 } 10530 10442 psArray *detProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 11440 11352 static void detNormalizedImfileRowFree(detNormalizedImfileRow *object); 11441 11353 11442 detNormalizedImfileRow *detNormalizedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, psS16 fault)11354 detNormalizedImfileRow *detNormalizedImfileRowAlloc(psS32 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 11443 11355 { 11444 11356 detNormalizedImfileRow *_object; … … 11454 11366 _object->bg_stdev = bg_stdev; 11455 11367 _object->bg_mean_stdev = bg_mean_stdev; 11456 _object->b1_uri = psStringCopy(b1_uri); 11457 _object->b2_uri = psStringCopy(b2_uri); 11368 _object->path_base = psStringCopy(path_base); 11458 11369 _object->fault = fault; 11459 11370 … … 11465 11376 psFree(object->class_id); 11466 11377 psFree(object->uri); 11467 psFree(object->b1_uri); 11468 psFree(object->b2_uri); 11378 psFree(object->path_base); 11469 11379 } 11470 11380 … … 11507 11417 return false; 11508 11418 } 11509 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, "255")) { 11510 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 11511 psFree(md); 11512 return false; 11513 } 11514 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, "255")) { 11515 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 11419 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, "255")) { 11420 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 11516 11421 psFree(md); 11517 11422 return false; … … 11535 11440 } 11536 11441 11537 bool detNormalizedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, psS16 fault)11442 bool detNormalizedImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *class_id, const char *uri, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 11538 11443 { 11539 11444 psMetadata *md = psMetadataAlloc(); … … 11573 11478 return false; 11574 11479 } 11575 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, b1_uri)) { 11576 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 11577 psFree(md); 11578 return false; 11579 } 11580 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) { 11581 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 11480 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) { 11481 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 11582 11482 psFree(md); 11583 11483 return false; … … 11611 11511 bool detNormalizedImfileInsertObject(psDB *dbh, detNormalizedImfileRow *object) 11612 11512 { 11613 return detNormalizedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object-> b1_uri, object->b2_uri, object->fault);11513 return detNormalizedImfileInsert(dbh, object->det_id, object->iteration, object->class_id, object->uri, object->bg, object->bg_stdev, object->bg_mean_stdev, object->path_base, object->fault); 11614 11514 } 11615 11515 … … 11719 11619 return false; 11720 11620 } 11721 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, object->b1_uri)) { 11722 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 11723 psFree(md); 11724 return false; 11725 } 11726 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, object->b2_uri)) { 11727 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 11621 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, object->path_base)) { 11622 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 11728 11623 psFree(md); 11729 11624 return false; … … 11778 11673 return false; 11779 11674 } 11780 char* b1_uri = psMetadataLookupPtr(&status, md, "b1_uri"); 11781 if (!status) { 11782 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b1_uri"); 11783 return false; 11784 } 11785 char* b2_uri = psMetadataLookupPtr(&status, md, "b2_uri"); 11786 if (!status) { 11787 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b2_uri"); 11675 char* path_base = psMetadataLookupPtr(&status, md, "path_base"); 11676 if (!status) { 11677 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item path_base"); 11788 11678 return false; 11789 11679 } … … 11794 11684 } 11795 11685 11796 return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, fault);11686 return detNormalizedImfileRowAlloc(det_id, iteration, class_id, uri, bg, bg_stdev, bg_mean_stdev, path_base, fault); 11797 11687 } 11798 11688 psArray *detNormalizedImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 11906 11796 static void detNormalizedExpRowFree(detNormalizedExpRow *object); 11907 11797 11908 detNormalizedExpRow *detNormalizedExpRowAlloc(psS32 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, psS16 fault)11798 detNormalizedExpRow *detNormalizedExpRowAlloc(psS32 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 11909 11799 { 11910 11800 detNormalizedExpRow *_object; … … 11919 11809 _object->bg_stdev = bg_stdev; 11920 11810 _object->bg_mean_stdev = bg_mean_stdev; 11921 _object->b1_uri = psStringCopy(b1_uri); 11922 _object->b2_uri = psStringCopy(b2_uri); 11811 _object->path_base = psStringCopy(path_base); 11923 11812 _object->fault = fault; 11924 11813 … … 11929 11818 { 11930 11819 psFree(object->recipe); 11931 psFree(object->b1_uri); 11932 psFree(object->b2_uri); 11820 psFree(object->path_base); 11933 11821 } 11934 11822 … … 11966 11854 return false; 11967 11855 } 11968 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, "255")) { 11969 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 11970 psFree(md); 11971 return false; 11972 } 11973 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, "255")) { 11974 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 11856 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, "255")) { 11857 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 11975 11858 psFree(md); 11976 11859 return false; … … 11994 11877 } 11995 11878 11996 bool detNormalizedExpInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, psS16 fault)11879 bool detNormalizedExpInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 11997 11880 { 11998 11881 psMetadata *md = psMetadataAlloc(); … … 12027 11910 return false; 12028 11911 } 12029 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, b1_uri)) { 12030 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 12031 psFree(md); 12032 return false; 12033 } 12034 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) { 12035 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 11912 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) { 11913 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 12036 11914 psFree(md); 12037 11915 return false; … … 12065 11943 bool detNormalizedExpInsertObject(psDB *dbh, detNormalizedExpRow *object) 12066 11944 { 12067 return detNormalizedExpInsert(dbh, object->det_id, object->iteration, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object-> b1_uri, object->b2_uri, object->fault);11945 return detNormalizedExpInsert(dbh, object->det_id, object->iteration, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->path_base, object->fault); 12068 11946 } 12069 11947 … … 12168 12046 return false; 12169 12047 } 12170 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, object->b1_uri)) { 12171 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 12172 psFree(md); 12173 return false; 12174 } 12175 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, object->b2_uri)) { 12176 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 12048 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, object->path_base)) { 12049 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 12177 12050 psFree(md); 12178 12051 return false; … … 12222 12095 return false; 12223 12096 } 12224 char* b1_uri = psMetadataLookupPtr(&status, md, "b1_uri"); 12225 if (!status) { 12226 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b1_uri"); 12227 return false; 12228 } 12229 char* b2_uri = psMetadataLookupPtr(&status, md, "b2_uri"); 12230 if (!status) { 12231 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b2_uri"); 12097 char* path_base = psMetadataLookupPtr(&status, md, "path_base"); 12098 if (!status) { 12099 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item path_base"); 12232 12100 return false; 12233 12101 } … … 12238 12106 } 12239 12107 12240 return detNormalizedExpRowAlloc(det_id, iteration, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, fault);12108 return detNormalizedExpRowAlloc(det_id, iteration, recipe, bg, bg_stdev, bg_mean_stdev, path_base, fault); 12241 12109 } 12242 12110 psArray *detNormalizedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 12350 12218 static void detResidImfileRowFree(detResidImfileRow *object); 12351 12219 12352 detResidImfileRow *detResidImfileRowAlloc(psS32 det_id, psS32 iteration, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, psS16 fault)12220 detResidImfileRow *detResidImfileRowAlloc(psS32 det_id, psS32 iteration, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 12353 12221 { 12354 12222 detResidImfileRow *_object; … … 12366 12234 _object->bg_stdev = bg_stdev; 12367 12235 _object->bg_mean_stdev = bg_mean_stdev; 12368 _object->b1_uri = psStringCopy(b1_uri); 12369 _object->b2_uri = psStringCopy(b2_uri); 12236 _object->path_base = psStringCopy(path_base); 12370 12237 _object->fault = fault; 12371 12238 … … 12379 12246 psFree(object->uri); 12380 12247 psFree(object->recipe); 12381 psFree(object->b1_uri); 12382 psFree(object->b2_uri); 12248 psFree(object->path_base); 12383 12249 } 12384 12250 … … 12431 12297 return false; 12432 12298 } 12433 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, "255")) { 12434 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 12435 psFree(md); 12436 return false; 12437 } 12438 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, "255")) { 12439 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 12299 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, "255")) { 12300 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 12440 12301 psFree(md); 12441 12302 return false; … … 12459 12320 } 12460 12321 12461 bool detResidImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, psS16 fault)12322 bool detResidImfileInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_tag, const char *class_id, const char *uri, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, psS16 fault) 12462 12323 { 12463 12324 psMetadata *md = psMetadataAlloc(); … … 12507 12368 return false; 12508 12369 } 12509 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, b1_uri)) { 12510 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 12511 psFree(md); 12512 return false; 12513 } 12514 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) { 12515 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 12370 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) { 12371 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 12516 12372 psFree(md); 12517 12373 return false; … … 12545 12401 bool detResidImfileInsertObject(psDB *dbh, detResidImfileRow *object) 12546 12402 { 12547 return detResidImfileInsert(dbh, object->det_id, object->iteration, object->exp_tag, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object-> b1_uri, object->b2_uri, object->fault);12403 return detResidImfileInsert(dbh, object->det_id, object->iteration, object->exp_tag, object->class_id, object->uri, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->path_base, object->fault); 12548 12404 } 12549 12405 … … 12663 12519 return false; 12664 12520 } 12665 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, object->b1_uri)) { 12666 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 12667 psFree(md); 12668 return false; 12669 } 12670 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, object->b2_uri)) { 12671 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 12521 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, object->path_base)) { 12522 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 12672 12523 psFree(md); 12673 12524 return false; … … 12732 12583 return false; 12733 12584 } 12734 char* b1_uri = psMetadataLookupPtr(&status, md, "b1_uri"); 12735 if (!status) { 12736 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b1_uri"); 12737 return false; 12738 } 12739 char* b2_uri = psMetadataLookupPtr(&status, md, "b2_uri"); 12740 if (!status) { 12741 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b2_uri"); 12585 char* path_base = psMetadataLookupPtr(&status, md, "path_base"); 12586 if (!status) { 12587 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item path_base"); 12742 12588 return false; 12743 12589 } … … 12748 12594 } 12749 12595 12750 return detResidImfileRowAlloc(det_id, iteration, exp_tag, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, fault);12596 return detResidImfileRowAlloc(det_id, iteration, exp_tag, class_id, uri, recipe, bg, bg_stdev, bg_mean_stdev, path_base, fault); 12751 12597 } 12752 12598 psArray *detResidImfileSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 12860 12706 static void detResidExpRowFree(detResidExpRow *object); 12861 12707 12862 detResidExpRow *detResidExpRowAlloc(psS32 det_id, psS32 iteration, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, bool accept, psS16 fault)12708 detResidExpRow *detResidExpRowAlloc(psS32 det_id, psS32 iteration, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, bool accept, psS16 fault) 12863 12709 { 12864 12710 detResidExpRow *_object; … … 12874 12720 _object->bg_stdev = bg_stdev; 12875 12721 _object->bg_mean_stdev = bg_mean_stdev; 12876 _object->b1_uri = psStringCopy(b1_uri); 12877 _object->b2_uri = psStringCopy(b2_uri); 12722 _object->path_base = psStringCopy(path_base); 12878 12723 _object->accept = accept; 12879 12724 _object->fault = fault; … … 12886 12731 psFree(object->exp_tag); 12887 12732 psFree(object->recipe); 12888 psFree(object->b1_uri); 12889 psFree(object->b2_uri); 12733 psFree(object->path_base); 12890 12734 } 12891 12735 … … 12928 12772 return false; 12929 12773 } 12930 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, "255")) { 12931 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 12932 psFree(md); 12933 return false; 12934 } 12935 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, "255")) { 12936 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 12774 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, "255")) { 12775 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 12937 12776 psFree(md); 12938 12777 return false; … … 12961 12800 } 12962 12801 12963 bool detResidExpInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char * b1_uri, const char *b2_uri, bool accept, psS16 fault)12802 bool detResidExpInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *exp_tag, const char *recipe, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, const char *path_base, bool accept, psS16 fault) 12964 12803 { 12965 12804 psMetadata *md = psMetadataAlloc(); … … 12999 12838 return false; 13000 12839 } 13001 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, b1_uri)) { 13002 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 13003 psFree(md); 13004 return false; 13005 } 13006 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, b2_uri)) { 13007 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 12840 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, path_base)) { 12841 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 13008 12842 psFree(md); 13009 12843 return false; … … 13042 12876 bool detResidExpInsertObject(psDB *dbh, detResidExpRow *object) 13043 12877 { 13044 return detResidExpInsert(dbh, object->det_id, object->iteration, object->exp_tag, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object-> b1_uri, object->b2_uri, object->accept, object->fault);12878 return detResidExpInsert(dbh, object->det_id, object->iteration, object->exp_tag, object->recipe, object->bg, object->bg_stdev, object->bg_mean_stdev, object->path_base, object->accept, object->fault); 13045 12879 } 13046 12880 … … 13150 12984 return false; 13151 12985 } 13152 if (!psMetadataAdd(md, PS_LIST_TAIL, "b1_uri", PS_DATA_STRING, NULL, object->b1_uri)) { 13153 psError(PS_ERR_UNKNOWN, false, "failed to add item b1_uri"); 13154 psFree(md); 13155 return false; 13156 } 13157 if (!psMetadataAdd(md, PS_LIST_TAIL, "b2_uri", PS_DATA_STRING, NULL, object->b2_uri)) { 13158 psError(PS_ERR_UNKNOWN, false, "failed to add item b2_uri"); 12986 if (!psMetadataAdd(md, PS_LIST_TAIL, "path_base", PS_DATA_STRING, NULL, object->path_base)) { 12987 psError(PS_ERR_UNKNOWN, false, "failed to add item path_base"); 13159 12988 psFree(md); 13160 12989 return false; … … 13214 13043 return false; 13215 13044 } 13216 char* b1_uri = psMetadataLookupPtr(&status, md, "b1_uri"); 13217 if (!status) { 13218 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b1_uri"); 13219 return false; 13220 } 13221 char* b2_uri = psMetadataLookupPtr(&status, md, "b2_uri"); 13222 if (!status) { 13223 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item b2_uri"); 13045 char* path_base = psMetadataLookupPtr(&status, md, "path_base"); 13046 if (!status) { 13047 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item path_base"); 13224 13048 return false; 13225 13049 } … … 13235 13059 } 13236 13060 13237 return detResidExpRowAlloc(det_id, iteration, exp_tag, recipe, bg, bg_stdev, bg_mean_stdev, b1_uri, b2_uri, accept, fault);13061 return detResidExpRowAlloc(det_id, iteration, exp_tag, recipe, bg, bg_stdev, bg_mean_stdev, path_base, accept, fault); 13238 13062 } 13239 13063 psArray *detResidExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 14466 14290 static void warpSkyCellMapRowFree(warpSkyCellMapRow *object); 14467 14291 14468 warpSkyCellMapRow *warpSkyCellMapRowAlloc(psS32 warp_id, const char *skycell_id, const char *tess_id, const char *exp_tag, psS32 cam_version, const char *class_id )14292 warpSkyCellMapRow *warpSkyCellMapRowAlloc(psS32 warp_id, const char *skycell_id, const char *tess_id, const char *exp_tag, psS32 cam_version, const char *class_id, psS16 fault) 14469 14293 { 14470 14294 warpSkyCellMapRow *_object; … … 14479 14303 _object->cam_version = cam_version; 14480 14304 _object->class_id = psStringCopy(class_id); 14305 _object->fault = fault; 14481 14306 14482 14307 return _object; … … 14524 14349 return false; 14525 14350 } 14351 if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "Key", 0)) { 14352 psError(PS_ERR_UNKNOWN, false, "failed to add item fault"); 14353 psFree(md); 14354 return false; 14355 } 14526 14356 14527 14357 bool status = psDBCreateTable(dbh, WARPSKYCELLMAP_TABLE_NAME, md); … … 14537 14367 } 14538 14368 14539 bool warpSkyCellMapInsert(psDB * dbh, psS32 warp_id, const char *skycell_id, const char *tess_id, const char *exp_tag, psS32 cam_version, const char *class_id )14369 bool warpSkyCellMapInsert(psDB * dbh, psS32 warp_id, const char *skycell_id, const char *tess_id, const char *exp_tag, psS32 cam_version, const char *class_id, psS16 fault) 14540 14370 { 14541 14371 psMetadata *md = psMetadataAlloc(); … … 14567 14397 if (!psMetadataAdd(md, PS_LIST_TAIL, "class_id", PS_DATA_STRING, NULL, class_id)) { 14568 14398 psError(PS_ERR_UNKNOWN, false, "failed to add item class_id"); 14399 psFree(md); 14400 return false; 14401 } 14402 if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, fault)) { 14403 psError(PS_ERR_UNKNOWN, false, "failed to add item fault"); 14569 14404 psFree(md); 14570 14405 return false; … … 14593 14428 bool warpSkyCellMapInsertObject(psDB *dbh, warpSkyCellMapRow *object) 14594 14429 { 14595 return warpSkyCellMapInsert(dbh, object->warp_id, object->skycell_id, object->tess_id, object->exp_tag, object->cam_version, object->class_id );14430 return warpSkyCellMapInsert(dbh, object->warp_id, object->skycell_id, object->tess_id, object->exp_tag, object->cam_version, object->class_id, object->fault); 14596 14431 } 14597 14432 … … 14696 14531 return false; 14697 14532 } 14533 if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) { 14534 psError(PS_ERR_UNKNOWN, false, "failed to add item fault"); 14535 psFree(md); 14536 return false; 14537 } 14698 14538 14699 14539 … … 14735 14575 return false; 14736 14576 } 14737 14738 return warpSkyCellMapRowAlloc(warp_id, skycell_id, tess_id, exp_tag, cam_version, class_id); 14577 psS16 fault = psMetadataLookupS16(&status, md, "fault"); 14578 if (!status) { 14579 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item fault"); 14580 return false; 14581 } 14582 14583 return warpSkyCellMapRowAlloc(warp_id, skycell_id, tess_id, exp_tag, cam_version, class_id, fault); 14739 14584 } 14740 14585 psArray *warpSkyCellMapSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) -
trunk/ippdb/src/ippdb.h
r12033 r12061 3548 3548 psF64 bg_stdev; 3549 3549 psF64 bg_mean_stdev; 3550 char *b1_uri; 3551 char *b2_uri; 3550 char *path_base; 3552 3551 psS16 fault; 3553 3552 } chipProcessedImfileRow; … … 3568 3567 psF64 bg_stdev, 3569 3568 psF64 bg_mean_stdev, 3570 const char *b1_uri, 3571 const char *b2_uri, 3569 const char *path_base, 3572 3570 psS16 fault 3573 3571 ); … … 3609 3607 psF64 bg_stdev, 3610 3608 psF64 bg_mean_stdev, 3611 const char *b1_uri, 3612 const char *b2_uri, 3609 const char *path_base, 3613 3610 psS16 fault 3614 3611 ); … … 3989 3986 psF32 sigma_dec; 3990 3987 psS32 nastro; 3991 char *b1_uri; 3992 char *b2_uri; 3988 char *path_base; 3993 3989 psF32 zp_mean; 3994 3990 psF32 zp_stdev; … … 4016 4012 psF32 sigma_dec, 4017 4013 psS32 nastro, 4018 const char *b1_uri, 4019 const char *b2_uri, 4014 const char *path_base, 4020 4015 psF32 zp_mean, 4021 4016 psF32 zp_stdev, … … 4064 4059 psF32 sigma_dec, 4065 4060 psS32 nastro, 4066 const char *b1_uri, 4067 const char *b2_uri, 4061 const char *path_base, 4068 4062 psF32 zp_mean, 4069 4063 psF32 zp_stdev, … … 4906 4900 psF64 bg_stdev; 4907 4901 psF64 bg_mean_stdev; 4908 char *b1_uri; 4909 char *b2_uri; 4902 char *path_base; 4910 4903 psS16 fault; 4911 4904 } detProcessedImfileRow; … … 4925 4918 psF64 bg_stdev, 4926 4919 psF64 bg_mean_stdev, 4927 const char *b1_uri, 4928 const char *b2_uri, 4920 const char *path_base, 4929 4921 psS16 fault 4930 4922 ); … … 4965 4957 psF64 bg_stdev, 4966 4958 psF64 bg_mean_stdev, 4967 const char *b1_uri, 4968 const char *b2_uri, 4959 const char *path_base, 4969 4960 psS16 fault 4970 4961 ); … … 5129 5120 psF64 bg_stdev; 5130 5121 psF64 bg_mean_stdev; 5131 char *b1_uri; 5132 char *b2_uri; 5122 char *path_base; 5133 5123 psS16 fault; 5134 5124 } detProcessedExpRow; … … 5146 5136 psF64 bg_stdev, 5147 5137 psF64 bg_mean_stdev, 5148 const char *b1_uri, 5149 const char *b2_uri, 5138 const char *path_base, 5150 5139 psS16 fault 5151 5140 ); … … 5184 5173 psF64 bg_stdev, 5185 5174 psF64 bg_mean_stdev, 5186 const char *b1_uri, 5187 const char *b2_uri, 5175 const char *path_base, 5188 5176 psS16 fault 5189 5177 ); … … 5775 5763 psF64 bg_stdev; 5776 5764 psF64 bg_mean_stdev; 5777 char *b1_uri; 5778 char *b2_uri; 5765 char *path_base; 5779 5766 psS16 fault; 5780 5767 } detNormalizedImfileRow; … … 5793 5780 psF64 bg_stdev, 5794 5781 psF64 bg_mean_stdev, 5795 const char *b1_uri, 5796 const char *b2_uri, 5782 const char *path_base, 5797 5783 psS16 fault 5798 5784 ); … … 5832 5818 psF64 bg_stdev, 5833 5819 psF64 bg_mean_stdev, 5834 const char *b1_uri, 5835 const char *b2_uri, 5820 const char *path_base, 5836 5821 psS16 fault 5837 5822 ); … … 5996 5981 psF64 bg_stdev; 5997 5982 psF64 bg_mean_stdev; 5998 char *b1_uri; 5999 char *b2_uri; 5983 char *path_base; 6000 5984 psS16 fault; 6001 5985 } detNormalizedExpRow; … … 6013 5997 psF64 bg_stdev, 6014 5998 psF64 bg_mean_stdev, 6015 const char *b1_uri, 6016 const char *b2_uri, 5999 const char *path_base, 6017 6000 psS16 fault 6018 6001 ); … … 6051 6034 psF64 bg_stdev, 6052 6035 psF64 bg_mean_stdev, 6053 const char *b1_uri, 6054 const char *b2_uri, 6036 const char *path_base, 6055 6037 psS16 fault 6056 6038 ); … … 6218 6200 psF64 bg_stdev; 6219 6201 psF64 bg_mean_stdev; 6220 char *b1_uri; 6221 char *b2_uri; 6202 char *path_base; 6222 6203 psS16 fault; 6223 6204 } detResidImfileRow; … … 6238 6219 psF64 bg_stdev, 6239 6220 psF64 bg_mean_stdev, 6240 const char *b1_uri, 6241 const char *b2_uri, 6221 const char *path_base, 6242 6222 psS16 fault 6243 6223 ); … … 6279 6259 psF64 bg_stdev, 6280 6260 psF64 bg_mean_stdev, 6281 const char *b1_uri, 6282 const char *b2_uri, 6261 const char *path_base, 6283 6262 psS16 fault 6284 6263 ); … … 6444 6423 psF64 bg_stdev; 6445 6424 psF64 bg_mean_stdev; 6446 char *b1_uri; 6447 char *b2_uri; 6425 char *path_base; 6448 6426 bool accept; 6449 6427 psS16 fault; … … 6463 6441 psF64 bg_stdev, 6464 6442 psF64 bg_mean_stdev, 6465 const char *b1_uri, 6466 const char *b2_uri, 6443 const char *path_base, 6467 6444 bool accept, 6468 6445 psS16 fault … … 6503 6480 psF64 bg_stdev, 6504 6481 psF64 bg_mean_stdev, 6505 const char *b1_uri, 6506 const char *b2_uri, 6482 const char *path_base, 6507 6483 bool accept, 6508 6484 psS16 fault … … 7295 7271 psS32 cam_version; 7296 7272 char *class_id; 7273 psS16 fault; 7297 7274 } warpSkyCellMapRow; 7298 7275 … … 7308 7285 const char *exp_tag, 7309 7286 psS32 cam_version, 7310 const char *class_id 7287 const char *class_id, 7288 psS16 fault 7311 7289 ); 7312 7290 … … 7343 7321 const char *exp_tag, 7344 7322 psS32 cam_version, 7345 const char *class_id 7323 const char *class_id, 7324 psS16 fault 7346 7325 ); 7347 7326 -
trunk/ippdb/tests/alloc.c
r12033 r12061 664 664 chipProcessedImfileRow *object; 665 665 666 object = chipProcessedImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16 );666 object = chipProcessedImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", -16 ); 667 667 668 668 if (!object) { … … 706 706 exit(EXIT_FAILURE); 707 707 } 708 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 709 psFree(object); 710 exit(EXIT_FAILURE); 711 } 712 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 708 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 713 709 psFree(object); 714 710 exit(EXIT_FAILURE); … … 762 758 camProcessedExpRow *object; 763 759 764 object = camProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string",32.32, 32.32, -16, "a string", "a string" );760 object = camProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16, "a string", "a string" ); 765 761 766 762 if (!object) { … … 816 812 exit(EXIT_FAILURE); 817 813 } 818 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 819 psFree(object); 820 exit(EXIT_FAILURE); 821 } 822 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 814 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 823 815 psFree(object); 824 816 exit(EXIT_FAILURE); … … 1013 1005 detProcessedImfileRow *object; 1014 1006 1015 object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16 );1007 object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", -16 ); 1016 1008 1017 1009 if (!object) { … … 1051 1043 exit(EXIT_FAILURE); 1052 1044 } 1053 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 1054 psFree(object); 1055 exit(EXIT_FAILURE); 1056 } 1057 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 1045 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 1058 1046 psFree(object); 1059 1047 exit(EXIT_FAILURE); … … 1070 1058 detProcessedExpRow *object; 1071 1059 1072 object = detProcessedExpRowAlloc(-32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16 );1060 object = detProcessedExpRowAlloc(-32, "a string", "a string", 64.64, 64.64, 64.64, "a string", -16 ); 1073 1061 1074 1062 if (!object) { … … 1100 1088 exit(EXIT_FAILURE); 1101 1089 } 1102 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 1103 psFree(object); 1104 exit(EXIT_FAILURE); 1105 } 1106 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 1090 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 1107 1091 psFree(object); 1108 1092 exit(EXIT_FAILURE); … … 1201 1185 detNormalizedImfileRow *object; 1202 1186 1203 object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16 );1187 object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", -16 ); 1204 1188 1205 1189 if (!object) { … … 1235 1219 exit(EXIT_FAILURE); 1236 1220 } 1237 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 1238 psFree(object); 1239 exit(EXIT_FAILURE); 1240 } 1241 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 1221 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 1242 1222 psFree(object); 1243 1223 exit(EXIT_FAILURE); … … 1254 1234 detNormalizedExpRow *object; 1255 1235 1256 object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string",-16 );1236 object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", -16 ); 1257 1237 1258 1238 if (!object) { … … 1284 1264 exit(EXIT_FAILURE); 1285 1265 } 1286 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 1287 psFree(object); 1288 exit(EXIT_FAILURE); 1289 } 1290 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 1266 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 1291 1267 psFree(object); 1292 1268 exit(EXIT_FAILURE); … … 1303 1279 detResidImfileRow *object; 1304 1280 1305 object = detResidImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16 );1281 object = detResidImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", -16 ); 1306 1282 1307 1283 if (!object) { … … 1345 1321 exit(EXIT_FAILURE); 1346 1322 } 1347 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 1348 psFree(object); 1349 exit(EXIT_FAILURE); 1350 } 1351 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 1323 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 1352 1324 psFree(object); 1353 1325 exit(EXIT_FAILURE); … … 1364 1336 detResidExpRow *object; 1365 1337 1366 object = detResidExpRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",true, -16 );1338 object = detResidExpRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", true, -16 ); 1367 1339 1368 1340 if (!object) { … … 1398 1370 exit(EXIT_FAILURE); 1399 1371 } 1400 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 1401 psFree(object); 1402 exit(EXIT_FAILURE); 1403 } 1404 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 1372 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 1405 1373 psFree(object); 1406 1374 exit(EXIT_FAILURE); … … 1527 1495 warpSkyCellMapRow *object; 1528 1496 1529 object = warpSkyCellMapRowAlloc(-32, "a string", "a string", "a string", -32, "a string" );1497 object = warpSkyCellMapRowAlloc(-32, "a string", "a string", "a string", -32, "a string", -16 ); 1530 1498 1531 1499 if (!object) { … … 1554 1522 } 1555 1523 if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) { 1524 psFree(object); 1525 exit(EXIT_FAILURE); 1526 } 1527 if (!object->fault == -16) { 1556 1528 psFree(object); 1557 1529 exit(EXIT_FAILURE); -
trunk/ippdb/tests/insert.c
r12026 r12061 253 253 } 254 254 255 if (!chipProcessedImfileInsert(dbh, "a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16)) {255 if (!chipProcessedImfileInsert(dbh, "a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", -16)) { 256 256 exit(EXIT_FAILURE); 257 257 } … … 283 283 } 284 284 285 if (!camProcessedExpInsert(dbh, "a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string",32.32, 32.32, -16, "a string", "a string")) {285 if (!camProcessedExpInsert(dbh, "a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16, "a string", "a string")) { 286 286 exit(EXIT_FAILURE); 287 287 } … … 343 343 } 344 344 345 if (!detProcessedImfileInsert(dbh, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16)) {346 exit(EXIT_FAILURE); 347 } 348 349 psDBCleanup(dbh); 350 } 351 352 { 353 psDB *dbh; 354 355 dbh = psDBInit("localhost", "test", NULL, "test"); 356 if (!dbh) { 357 exit(EXIT_FAILURE); 358 } 359 360 if (!detProcessedExpInsert(dbh, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16)) {345 if (!detProcessedImfileInsert(dbh, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", -16)) { 346 exit(EXIT_FAILURE); 347 } 348 349 psDBCleanup(dbh); 350 } 351 352 { 353 psDB *dbh; 354 355 dbh = psDBInit("localhost", "test", NULL, "test"); 356 if (!dbh) { 357 exit(EXIT_FAILURE); 358 } 359 360 if (!detProcessedExpInsert(dbh, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", -16)) { 361 361 exit(EXIT_FAILURE); 362 362 } … … 403 403 } 404 404 405 if (!detNormalizedImfileInsert(dbh, -32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16)) {406 exit(EXIT_FAILURE); 407 } 408 409 psDBCleanup(dbh); 410 } 411 412 { 413 psDB *dbh; 414 415 dbh = psDBInit("localhost", "test", NULL, "test"); 416 if (!dbh) { 417 exit(EXIT_FAILURE); 418 } 419 420 if (!detNormalizedExpInsert(dbh, -32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string",-16)) {421 exit(EXIT_FAILURE); 422 } 423 424 psDBCleanup(dbh); 425 } 426 427 { 428 psDB *dbh; 429 430 dbh = psDBInit("localhost", "test", NULL, "test"); 431 if (!dbh) { 432 exit(EXIT_FAILURE); 433 } 434 435 if (!detResidImfileInsert(dbh, -32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16)) {436 exit(EXIT_FAILURE); 437 } 438 439 psDBCleanup(dbh); 440 } 441 442 { 443 psDB *dbh; 444 445 dbh = psDBInit("localhost", "test", NULL, "test"); 446 if (!dbh) { 447 exit(EXIT_FAILURE); 448 } 449 450 if (!detResidExpInsert(dbh, -32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",true, -16)) {405 if (!detNormalizedImfileInsert(dbh, -32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", -16)) { 406 exit(EXIT_FAILURE); 407 } 408 409 psDBCleanup(dbh); 410 } 411 412 { 413 psDB *dbh; 414 415 dbh = psDBInit("localhost", "test", NULL, "test"); 416 if (!dbh) { 417 exit(EXIT_FAILURE); 418 } 419 420 if (!detNormalizedExpInsert(dbh, -32, -32, "a string", 64.64, 64.64, 64.64, "a string", -16)) { 421 exit(EXIT_FAILURE); 422 } 423 424 psDBCleanup(dbh); 425 } 426 427 { 428 psDB *dbh; 429 430 dbh = psDBInit("localhost", "test", NULL, "test"); 431 if (!dbh) { 432 exit(EXIT_FAILURE); 433 } 434 435 if (!detResidImfileInsert(dbh, -32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", -16)) { 436 exit(EXIT_FAILURE); 437 } 438 439 psDBCleanup(dbh); 440 } 441 442 { 443 psDB *dbh; 444 445 dbh = psDBInit("localhost", "test", NULL, "test"); 446 if (!dbh) { 447 exit(EXIT_FAILURE); 448 } 449 450 if (!detResidExpInsert(dbh, -32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", true, -16)) { 451 451 exit(EXIT_FAILURE); 452 452 } … … 508 508 } 509 509 510 if (!warpSkyCellMapInsert(dbh, -32, "a string", "a string", "a string", -32, "a string" )) {510 if (!warpSkyCellMapInsert(dbh, -32, "a string", "a string", "a string", -32, "a string", -16)) { 511 511 exit(EXIT_FAILURE); 512 512 } -
trunk/ippdb/tests/insertobject.c
r12026 r12061 366 366 } 367 367 368 object = chipProcessedImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16);368 object = chipProcessedImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", -16); 369 369 if (!object) { 370 370 exit(EXIT_FAILURE); … … 410 410 } 411 411 412 object = camProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string",32.32, 32.32, -16, "a string", "a string");412 object = camProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16, "a string", "a string"); 413 413 if (!object) { 414 414 exit(EXIT_FAILURE); … … 498 498 } 499 499 500 object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16);500 object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", -16); 501 501 if (!object) { 502 502 exit(EXIT_FAILURE); … … 520 520 } 521 521 522 object = detProcessedExpRowAlloc(-32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16);522 object = detProcessedExpRowAlloc(-32, "a string", "a string", 64.64, 64.64, 64.64, "a string", -16); 523 523 if (!object) { 524 524 exit(EXIT_FAILURE); … … 586 586 } 587 587 588 object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16);588 object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", -16); 589 589 if (!object) { 590 590 exit(EXIT_FAILURE); … … 608 608 } 609 609 610 object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string",-16);610 object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", -16); 611 611 if (!object) { 612 612 exit(EXIT_FAILURE); … … 630 630 } 631 631 632 object = detResidImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16);632 object = detResidImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", -16); 633 633 if (!object) { 634 634 exit(EXIT_FAILURE); … … 652 652 } 653 653 654 object = detResidExpRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",true, -16);654 object = detResidExpRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", true, -16); 655 655 if (!object) { 656 656 exit(EXIT_FAILURE); … … 740 740 } 741 741 742 object = warpSkyCellMapRowAlloc(-32, "a string", "a string", "a string", -32, "a string" );742 object = warpSkyCellMapRowAlloc(-32, "a string", "a string", "a string", -32, "a string", -16); 743 743 if (!object) { 744 744 exit(EXIT_FAILURE); -
trunk/ippdb/tests/metadatafromobject.c
r12033 r12061 791 791 bool status; 792 792 793 object = chipProcessedImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16);793 object = chipProcessedImfileRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", -16); 794 794 if (!object) { 795 795 exit(EXIT_FAILURE); … … 839 839 exit(EXIT_FAILURE); 840 840 } 841 if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) { 842 psFree(md); 843 exit(EXIT_FAILURE); 844 } 845 if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) { 841 if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) { 846 842 psFree(md); 847 843 exit(EXIT_FAILURE); … … 904 900 bool status; 905 901 906 object = camProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", "a string",32.32, 32.32, -16, "a string", "a string");902 object = camProcessedExpRowAlloc("a string", -32, -32, "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16, "a string", "a string"); 907 903 if (!object) { 908 904 exit(EXIT_FAILURE); … … 964 960 exit(EXIT_FAILURE); 965 961 } 966 if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) { 967 psFree(md); 968 exit(EXIT_FAILURE); 969 } 970 if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) { 962 if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) { 971 963 psFree(md); 972 964 exit(EXIT_FAILURE); … … 1186 1178 bool status; 1187 1179 1188 object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16);1180 object = detProcessedImfileRowAlloc(-32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", -16); 1189 1181 if (!object) { 1190 1182 exit(EXIT_FAILURE); … … 1230 1222 exit(EXIT_FAILURE); 1231 1223 } 1232 if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) { 1233 psFree(md); 1234 exit(EXIT_FAILURE); 1235 } 1236 if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) { 1224 if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) { 1237 1225 psFree(md); 1238 1226 exit(EXIT_FAILURE); … … 1250 1238 bool status; 1251 1239 1252 object = detProcessedExpRowAlloc(-32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16);1240 object = detProcessedExpRowAlloc(-32, "a string", "a string", 64.64, 64.64, 64.64, "a string", -16); 1253 1241 if (!object) { 1254 1242 exit(EXIT_FAILURE); … … 1286 1274 exit(EXIT_FAILURE); 1287 1275 } 1288 if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) { 1289 psFree(md); 1290 exit(EXIT_FAILURE); 1291 } 1292 if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) { 1276 if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) { 1293 1277 psFree(md); 1294 1278 exit(EXIT_FAILURE); … … 1402 1386 bool status; 1403 1387 1404 object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16);1388 object = detNormalizedImfileRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", -16); 1405 1389 if (!object) { 1406 1390 exit(EXIT_FAILURE); … … 1442 1426 exit(EXIT_FAILURE); 1443 1427 } 1444 if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) { 1445 psFree(md); 1446 exit(EXIT_FAILURE); 1447 } 1448 if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) { 1428 if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) { 1449 1429 psFree(md); 1450 1430 exit(EXIT_FAILURE); … … 1462 1442 bool status; 1463 1443 1464 object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", "a string",-16);1444 object = detNormalizedExpRowAlloc(-32, -32, "a string", 64.64, 64.64, 64.64, "a string", -16); 1465 1445 if (!object) { 1466 1446 exit(EXIT_FAILURE); … … 1498 1478 exit(EXIT_FAILURE); 1499 1479 } 1500 if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) { 1501 psFree(md); 1502 exit(EXIT_FAILURE); 1503 } 1504 if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) { 1480 if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) { 1505 1481 psFree(md); 1506 1482 exit(EXIT_FAILURE); … … 1518 1494 bool status; 1519 1495 1520 object = detResidImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",-16);1496 object = detResidImfileRowAlloc(-32, -32, "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, "a string", -16); 1521 1497 if (!object) { 1522 1498 exit(EXIT_FAILURE); … … 1566 1542 exit(EXIT_FAILURE); 1567 1543 } 1568 if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) { 1569 psFree(md); 1570 exit(EXIT_FAILURE); 1571 } 1572 if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) { 1544 if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) { 1573 1545 psFree(md); 1574 1546 exit(EXIT_FAILURE); … … 1586 1558 bool status; 1587 1559 1588 object = detResidExpRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", "a string",true, -16);1560 object = detResidExpRowAlloc(-32, -32, "a string", "a string", 64.64, 64.64, 64.64, "a string", true, -16); 1589 1561 if (!object) { 1590 1562 exit(EXIT_FAILURE); … … 1626 1598 exit(EXIT_FAILURE); 1627 1599 } 1628 if (strncmp(psMetadataLookupPtr(&status, md, "b1_uri"), "a string", MAX_STRING_LENGTH)) { 1629 psFree(md); 1630 exit(EXIT_FAILURE); 1631 } 1632 if (strncmp(psMetadataLookupPtr(&status, md, "b2_uri"), "a string", MAX_STRING_LENGTH)) { 1600 if (strncmp(psMetadataLookupPtr(&status, md, "path_base"), "a string", MAX_STRING_LENGTH)) { 1633 1601 psFree(md); 1634 1602 exit(EXIT_FAILURE); … … 1779 1747 bool status; 1780 1748 1781 object = warpSkyCellMapRowAlloc(-32, "a string", "a string", "a string", -32, "a string" );1749 object = warpSkyCellMapRowAlloc(-32, "a string", "a string", "a string", -32, "a string", -16); 1782 1750 if (!object) { 1783 1751 exit(EXIT_FAILURE); … … 1812 1780 } 1813 1781 if (strncmp(psMetadataLookupPtr(&status, md, "class_id"), "a string", MAX_STRING_LENGTH)) { 1782 psFree(md); 1783 exit(EXIT_FAILURE); 1784 } 1814 1785 psFree(md); 1815 1786 exit(EXIT_FAILURE); -
trunk/ippdb/tests/objectfrommetadata.c
r12033 r12061 1221 1221 exit(EXIT_FAILURE); 1222 1222 } 1223 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) { 1224 psFree(md); 1225 exit(EXIT_FAILURE); 1226 } 1227 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) { 1223 if (!psMetadataAddStr(md, PS_LIST_TAIL, "path_base", 0, NULL, "a string")) { 1228 1224 psFree(md); 1229 1225 exit(EXIT_FAILURE); … … 1277 1273 exit(EXIT_FAILURE); 1278 1274 } 1279 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 1280 psFree(object); 1281 exit(EXIT_FAILURE); 1282 } 1283 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 1275 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 1284 1276 psFree(object); 1285 1277 exit(EXIT_FAILURE); … … 1411 1403 exit(EXIT_FAILURE); 1412 1404 } 1413 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) { 1414 psFree(md); 1415 exit(EXIT_FAILURE); 1416 } 1417 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) { 1405 if (!psMetadataAddStr(md, PS_LIST_TAIL, "path_base", 0, NULL, "a string")) { 1418 1406 psFree(md); 1419 1407 exit(EXIT_FAILURE); … … 1495 1483 exit(EXIT_FAILURE); 1496 1484 } 1497 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 1498 psFree(object); 1499 exit(EXIT_FAILURE); 1500 } 1501 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 1485 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 1502 1486 psFree(object); 1503 1487 exit(EXIT_FAILURE); … … 1863 1847 exit(EXIT_FAILURE); 1864 1848 } 1865 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) { 1866 psFree(md); 1867 exit(EXIT_FAILURE); 1868 } 1869 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) { 1849 if (!psMetadataAddStr(md, PS_LIST_TAIL, "path_base", 0, NULL, "a string")) { 1870 1850 psFree(md); 1871 1851 exit(EXIT_FAILURE); … … 1915 1895 exit(EXIT_FAILURE); 1916 1896 } 1917 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 1918 psFree(object); 1919 exit(EXIT_FAILURE); 1920 } 1921 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 1897 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 1922 1898 psFree(object); 1923 1899 exit(EXIT_FAILURE); … … 1959 1935 exit(EXIT_FAILURE); 1960 1936 } 1961 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) { 1962 psFree(md); 1963 exit(EXIT_FAILURE); 1964 } 1965 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) { 1937 if (!psMetadataAddStr(md, PS_LIST_TAIL, "path_base", 0, NULL, "a string")) { 1966 1938 psFree(md); 1967 1939 exit(EXIT_FAILURE); … … 2003 1975 exit(EXIT_FAILURE); 2004 1976 } 2005 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 2006 psFree(object); 2007 exit(EXIT_FAILURE); 2008 } 2009 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 1977 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 2010 1978 psFree(object); 2011 1979 exit(EXIT_FAILURE); … … 2195 2163 exit(EXIT_FAILURE); 2196 2164 } 2197 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) { 2198 psFree(md); 2199 exit(EXIT_FAILURE); 2200 } 2201 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) { 2165 if (!psMetadataAddStr(md, PS_LIST_TAIL, "path_base", 0, NULL, "a string")) { 2202 2166 psFree(md); 2203 2167 exit(EXIT_FAILURE); … … 2243 2207 exit(EXIT_FAILURE); 2244 2208 } 2245 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 2246 psFree(object); 2247 exit(EXIT_FAILURE); 2248 } 2249 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 2209 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 2250 2210 psFree(object); 2251 2211 exit(EXIT_FAILURE); … … 2287 2247 exit(EXIT_FAILURE); 2288 2248 } 2289 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) { 2290 psFree(md); 2291 exit(EXIT_FAILURE); 2292 } 2293 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) { 2249 if (!psMetadataAddStr(md, PS_LIST_TAIL, "path_base", 0, NULL, "a string")) { 2294 2250 psFree(md); 2295 2251 exit(EXIT_FAILURE); … … 2331 2287 exit(EXIT_FAILURE); 2332 2288 } 2333 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 2334 psFree(object); 2335 exit(EXIT_FAILURE); 2336 } 2337 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 2289 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 2338 2290 psFree(object); 2339 2291 exit(EXIT_FAILURE); … … 2387 2339 exit(EXIT_FAILURE); 2388 2340 } 2389 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) { 2390 psFree(md); 2391 exit(EXIT_FAILURE); 2392 } 2393 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) { 2341 if (!psMetadataAddStr(md, PS_LIST_TAIL, "path_base", 0, NULL, "a string")) { 2394 2342 psFree(md); 2395 2343 exit(EXIT_FAILURE); … … 2443 2391 exit(EXIT_FAILURE); 2444 2392 } 2445 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 2446 psFree(object); 2447 exit(EXIT_FAILURE); 2448 } 2449 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 2393 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 2450 2394 psFree(object); 2451 2395 exit(EXIT_FAILURE); … … 2491 2435 exit(EXIT_FAILURE); 2492 2436 } 2493 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b1_uri", 0, NULL, "a string")) { 2494 psFree(md); 2495 exit(EXIT_FAILURE); 2496 } 2497 if (!psMetadataAddStr(md, PS_LIST_TAIL, "b2_uri", 0, NULL, "a string")) { 2437 if (!psMetadataAddStr(md, PS_LIST_TAIL, "path_base", 0, NULL, "a string")) { 2498 2438 psFree(md); 2499 2439 exit(EXIT_FAILURE); … … 2543 2483 exit(EXIT_FAILURE); 2544 2484 } 2545 if (strncmp(object->b1_uri, "a string", MAX_STRING_LENGTH)) { 2546 psFree(object); 2547 exit(EXIT_FAILURE); 2548 } 2549 if (strncmp(object->b2_uri, "a string", MAX_STRING_LENGTH)) { 2485 if (strncmp(object->path_base, "a string", MAX_STRING_LENGTH)) { 2550 2486 psFree(object); 2551 2487 exit(EXIT_FAILURE); … … 2777 2713 exit(EXIT_FAILURE); 2778 2714 } 2715 psFree(md); 2716 exit(EXIT_FAILURE); 2717 } 2779 2718 2780 2719 object = warpSkyCellMapObjectFromMetadata(md); … … 2807 2746 } 2808 2747 if (strncmp(object->class_id, "a string", MAX_STRING_LENGTH)) { 2748 psFree(object); 2749 exit(EXIT_FAILURE); 2750 } 2809 2751 psFree(object); 2810 2752 exit(EXIT_FAILURE);
Note:
See TracChangeset
for help on using the changeset viewer.
