Changeset 12236
- Timestamp:
- Mar 5, 2007, 12:36:18 PM (19 years ago)
- Location:
- trunk/ippdb
- Files:
-
- 7 edited
-
src/ippdb.c (modified) (30 diffs)
-
src/ippdb.h (modified) (9 diffs)
-
tests/alloc.c (modified) (6 diffs)
-
tests/insert.c (modified) (2 diffs)
-
tests/insertobject.c (modified) (3 diffs)
-
tests/metadatafromobject.c (modified) (6 diffs)
-
tests/objectfrommetadata.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippdb/src/ippdb.c
r12231 r12236 6010 6010 static void chipProcessedExpRowFree(chipProcessedExpRow *object); 6011 6011 6012 chipProcessedExpRow *chipProcessedExpRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char * label, const char *recipe, const char *expgroup, const char *dvodb)6012 chipProcessedExpRow *chipProcessedExpRowAlloc(psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb) 6013 6013 { 6014 6014 chipProcessedExpRow *_object; … … 6020 6020 _object->exp_tag = psStringCopy(exp_tag); 6021 6021 _object->guide_id = guide_id; 6022 _object->workdir = psStringCopy(workdir); 6022 6023 _object->label = psStringCopy(label); 6023 6024 _object->recipe = psStringCopy(recipe); … … 6031 6032 { 6032 6033 psFree(object->exp_tag); 6034 psFree(object->workdir); 6033 6035 psFree(object->label); 6034 6036 psFree(object->recipe); … … 6055 6057 return false; 6056 6058 } 6059 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, "255")) { 6060 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 6061 psFree(md); 6062 return false; 6063 } 6057 6064 if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, "key", "64")) { 6058 6065 psError(PS_ERR_UNKNOWN, false, "failed to add item label"); … … 6088 6095 } 6089 6096 6090 bool chipProcessedExpInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char * label, const char *recipe, const char *expgroup, const char *dvodb)6097 bool chipProcessedExpInsert(psDB * dbh, psS64 chip_id, const char *exp_tag, psS64 guide_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb) 6091 6098 { 6092 6099 psMetadata *md = psMetadataAlloc(); … … 6103 6110 if (!psMetadataAdd(md, PS_LIST_TAIL, "guide_id", PS_DATA_S64, NULL, guide_id)) { 6104 6111 psError(PS_ERR_UNKNOWN, false, "failed to add item guide_id"); 6112 psFree(md); 6113 return false; 6114 } 6115 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) { 6116 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 6105 6117 psFree(md); 6106 6118 return false; … … 6149 6161 bool chipProcessedExpInsertObject(psDB *dbh, chipProcessedExpRow *object) 6150 6162 { 6151 return chipProcessedExpInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object-> label, object->recipe, object->expgroup, object->dvodb);6163 return chipProcessedExpInsert(dbh, object->chip_id, object->exp_tag, object->guide_id, object->workdir, object->label, object->recipe, object->expgroup, object->dvodb); 6152 6164 } 6153 6165 … … 6237 6249 return false; 6238 6250 } 6251 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, object->workdir)) { 6252 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 6253 psFree(md); 6254 return false; 6255 } 6239 6256 if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, object->label)) { 6240 6257 psError(PS_ERR_UNKNOWN, false, "failed to add item label"); … … 6281 6298 return false; 6282 6299 } 6300 char* workdir = psMetadataLookupPtr(&status, md, "workdir"); 6301 if (!status) { 6302 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item workdir"); 6303 return false; 6304 } 6283 6305 char* label = psMetadataLookupPtr(&status, md, "label"); 6284 6306 if (!status) { … … 6302 6324 } 6303 6325 6304 return chipProcessedExpRowAlloc(chip_id, exp_tag, guide_id, label, recipe, expgroup, dvodb);6326 return chipProcessedExpRowAlloc(chip_id, exp_tag, guide_id, workdir, label, recipe, expgroup, dvodb); 6305 6327 } 6306 6328 psArray *chipProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 7111 7133 static void camPendingExpRowFree(camPendingExpRow *object); 7112 7134 7113 camPendingExpRow *camPendingExpRowAlloc(psS64 cam_id, psS64 chip_id, const char * label, const char *recipe, const char *expgroup, const char *dvodb)7135 camPendingExpRow *camPendingExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb) 7114 7136 { 7115 7137 camPendingExpRow *_object; … … 7120 7142 _object->cam_id = cam_id; 7121 7143 _object->chip_id = chip_id; 7144 _object->workdir = psStringCopy(workdir); 7122 7145 _object->label = psStringCopy(label); 7123 7146 _object->recipe = psStringCopy(recipe); … … 7130 7153 static void camPendingExpRowFree(camPendingExpRow *object) 7131 7154 { 7155 psFree(object->workdir); 7132 7156 psFree(object->label); 7133 7157 psFree(object->recipe); … … 7149 7173 return false; 7150 7174 } 7175 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, "255")) { 7176 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 7177 psFree(md); 7178 return false; 7179 } 7151 7180 if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, "key", "64")) { 7152 7181 psError(PS_ERR_UNKNOWN, false, "failed to add item label"); … … 7182 7211 } 7183 7212 7184 bool camPendingExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char * label, const char *recipe, const char *expgroup, const char *dvodb)7213 bool camPendingExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb) 7185 7214 { 7186 7215 psMetadata *md = psMetadataAlloc(); … … 7192 7221 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, chip_id)) { 7193 7222 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 7223 psFree(md); 7224 return false; 7225 } 7226 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) { 7227 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 7194 7228 psFree(md); 7195 7229 return false; … … 7238 7272 bool camPendingExpInsertObject(psDB *dbh, camPendingExpRow *object) 7239 7273 { 7240 return camPendingExpInsert(dbh, object->cam_id, object->chip_id, object-> label, object->recipe, object->expgroup, object->dvodb);7274 return camPendingExpInsert(dbh, object->cam_id, object->chip_id, object->workdir, object->label, object->recipe, object->expgroup, object->dvodb); 7241 7275 } 7242 7276 … … 7321 7355 return false; 7322 7356 } 7357 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, object->workdir)) { 7358 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 7359 psFree(md); 7360 return false; 7361 } 7323 7362 if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, object->label)) { 7324 7363 psError(PS_ERR_UNKNOWN, false, "failed to add item label"); … … 7360 7399 return false; 7361 7400 } 7401 char* workdir = psMetadataLookupPtr(&status, md, "workdir"); 7402 if (!status) { 7403 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item workdir"); 7404 return false; 7405 } 7362 7406 char* label = psMetadataLookupPtr(&status, md, "label"); 7363 7407 if (!status) { … … 7381 7425 } 7382 7426 7383 return camPendingExpRowAlloc(cam_id, chip_id, label, recipe, expgroup, dvodb);7427 return camPendingExpRowAlloc(cam_id, chip_id, workdir, label, recipe, expgroup, dvodb); 7384 7428 } 7385 7429 psArray *camPendingExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 7493 7537 static void camProcessedExpRowFree(camProcessedExpRow *object); 7494 7538 7495 camProcessedExpRow *camProcessedExpRowAlloc(psS64 cam_id, psS64 chip_id, const char * label, const char *recipe, const char *expgroup, const char *dvodb, const char *uri, 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)7539 camProcessedExpRow *camProcessedExpRowAlloc(psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb, const char *uri, 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) 7496 7540 { 7497 7541 camProcessedExpRow *_object; … … 7502 7546 _object->cam_id = cam_id; 7503 7547 _object->chip_id = chip_id; 7548 _object->workdir = psStringCopy(workdir); 7504 7549 _object->label = psStringCopy(label); 7505 7550 _object->recipe = psStringCopy(recipe); … … 7523 7568 static void camProcessedExpRowFree(camProcessedExpRow *object) 7524 7569 { 7570 psFree(object->workdir); 7525 7571 psFree(object->label); 7526 7572 psFree(object->recipe); … … 7544 7590 return false; 7545 7591 } 7592 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, "255")) { 7593 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 7594 psFree(md); 7595 return false; 7596 } 7546 7597 if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, "key", "64")) { 7547 7598 psError(PS_ERR_UNKNOWN, false, "failed to add item label"); … … 7632 7683 } 7633 7684 7634 bool camProcessedExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char * label, const char *recipe, const char *expgroup, const char *dvodb, const char *uri, 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)7685 bool camProcessedExpInsert(psDB * dbh, psS64 cam_id, psS64 chip_id, const char *workdir, const char *label, const char *recipe, const char *expgroup, const char *dvodb, const char *uri, 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) 7635 7686 { 7636 7687 psMetadata *md = psMetadataAlloc(); … … 7642 7693 if (!psMetadataAdd(md, PS_LIST_TAIL, "chip_id", PS_DATA_S64, NULL, chip_id)) { 7643 7694 psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id"); 7695 psFree(md); 7696 return false; 7697 } 7698 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) { 7699 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 7644 7700 psFree(md); 7645 7701 return false; … … 7743 7799 bool camProcessedExpInsertObject(psDB *dbh, camProcessedExpRow *object) 7744 7800 { 7745 return camProcessedExpInsert(dbh, object->cam_id, object->chip_id, object-> label, object->recipe, object->expgroup, object->dvodb, object->uri, 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);7801 return camProcessedExpInsert(dbh, object->cam_id, object->chip_id, object->workdir, object->label, object->recipe, object->expgroup, object->dvodb, object->uri, 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); 7746 7802 } 7747 7803 … … 7826 7882 return false; 7827 7883 } 7884 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, object->workdir)) { 7885 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 7886 psFree(md); 7887 return false; 7888 } 7828 7889 if (!psMetadataAdd(md, PS_LIST_TAIL, "label", PS_DATA_STRING, NULL, object->label)) { 7829 7890 psError(PS_ERR_UNKNOWN, false, "failed to add item label"); … … 7920 7981 return false; 7921 7982 } 7983 char* workdir = psMetadataLookupPtr(&status, md, "workdir"); 7984 if (!status) { 7985 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item workdir"); 7986 return false; 7987 } 7922 7988 char* label = psMetadataLookupPtr(&status, md, "label"); 7923 7989 if (!status) { … … 7996 8062 } 7997 8063 7998 return camProcessedExpRowAlloc(cam_id, chip_id, label, recipe, expgroup, dvodb, uri, bg, bg_stdev, bg_mean_stdev, sigma_ra, sigma_dec, nastro, path_base, zp_mean, zp_stdev, fault);8064 return camProcessedExpRowAlloc(cam_id, chip_id, workdir, label, recipe, expgroup, dvodb, uri, bg, bg_stdev, bg_mean_stdev, sigma_ra, sigma_dec, nastro, path_base, zp_mean, zp_stdev, fault); 7999 8065 } 8000 8066 psArray *camProcessedExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) -
trunk/ippdb/src/ippdb.h
r12231 r12236 3131 3131 char *exp_tag; 3132 3132 psS64 guide_id; 3133 char *workdir; 3133 3134 char *label; 3134 3135 char *recipe; … … 3146 3147 const char *exp_tag, 3147 3148 psS64 guide_id, 3149 const char *workdir, 3148 3150 const char *label, 3149 3151 const char *recipe, … … 3182 3184 const char *exp_tag, 3183 3185 psS64 guide_id, 3186 const char *workdir, 3184 3187 const char *label, 3185 3188 const char *recipe, … … 3754 3757 psS64 cam_id; 3755 3758 psS64 chip_id; 3759 char *workdir; 3756 3760 char *label; 3757 3761 char *recipe; … … 3768 3772 psS64 cam_id, 3769 3773 psS64 chip_id, 3774 const char *workdir, 3770 3775 const char *label, 3771 3776 const char *recipe, … … 3803 3808 psS64 cam_id, 3804 3809 psS64 chip_id, 3810 const char *workdir, 3805 3811 const char *label, 3806 3812 const char *recipe, … … 3964 3970 psS64 cam_id; 3965 3971 psS64 chip_id; 3972 char *workdir; 3966 3973 char *label; 3967 3974 char *recipe; … … 3989 3996 psS64 cam_id, 3990 3997 psS64 chip_id, 3998 const char *workdir, 3991 3999 const char *label, 3992 4000 const char *recipe, … … 4035 4043 psS64 cam_id, 4036 4044 psS64 chip_id, 4045 const char *workdir, 4037 4046 const char *label, 4038 4047 const char *recipe, -
trunk/ippdb/tests/alloc.c
r12231 r12236 602 602 chipProcessedExpRow *object; 603 603 604 object = chipProcessedExpRowAlloc(-64, "a string", -64, "a string", "a string", "a string", "a string" );604 object = chipProcessedExpRowAlloc(-64, "a string", -64, "a string", "a string", "a string", "a string", "a string" ); 605 605 606 606 if (!object) { … … 620 620 exit(EXIT_FAILURE); 621 621 } 622 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 623 psFree(object); 624 exit(EXIT_FAILURE); 625 } 622 626 if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) { 623 627 psFree(object); … … 705 709 camPendingExpRow *object; 706 710 707 object = camPendingExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string" );711 object = camPendingExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string" ); 708 712 709 713 if (!object) { … … 719 723 exit(EXIT_FAILURE); 720 724 } 725 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 726 psFree(object); 727 exit(EXIT_FAILURE); 728 } 721 729 if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) { 722 730 psFree(object); … … 742 750 camProcessedExpRow *object; 743 751 744 object = camProcessedExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16 );752 object = camProcessedExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16 ); 745 753 746 754 if (!object) { … … 753 761 } 754 762 if (!object->chip_id == -64) { 763 psFree(object); 764 exit(EXIT_FAILURE); 765 } 766 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 755 767 psFree(object); 756 768 exit(EXIT_FAILURE); -
trunk/ippdb/tests/insert.c
r12231 r12236 223 223 } 224 224 225 if (!chipProcessedExpInsert(dbh, -64, "a string", -64, "a string", "a string", "a string", "a string" )) {225 if (!chipProcessedExpInsert(dbh, -64, "a string", -64, "a string", "a string", "a string", "a string", "a string")) { 226 226 exit(EXIT_FAILURE); 227 227 } … … 268 268 } 269 269 270 if (!camPendingExpInsert(dbh, -64, -64, "a string", "a string", "a string", "a string" )) {271 exit(EXIT_FAILURE); 272 } 273 274 psDBCleanup(dbh); 275 } 276 277 { 278 psDB *dbh; 279 280 dbh = psDBInit("localhost", "test", NULL, "test"); 281 if (!dbh) { 282 exit(EXIT_FAILURE); 283 } 284 285 if (!camProcessedExpInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16)) {270 if (!camPendingExpInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string")) { 271 exit(EXIT_FAILURE); 272 } 273 274 psDBCleanup(dbh); 275 } 276 277 { 278 psDB *dbh; 279 280 dbh = psDBInit("localhost", "test", NULL, "test"); 281 if (!dbh) { 282 exit(EXIT_FAILURE); 283 } 284 285 if (!camProcessedExpInsert(dbh, -64, -64, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16)) { 286 286 exit(EXIT_FAILURE); 287 287 } -
trunk/ippdb/tests/insertobject.c
r12231 r12236 322 322 } 323 323 324 object = chipProcessedExpRowAlloc(-64, "a string", -64, "a string", "a string", "a string", "a string" );324 object = chipProcessedExpRowAlloc(-64, "a string", -64, "a string", "a string", "a string", "a string", "a string"); 325 325 if (!object) { 326 326 exit(EXIT_FAILURE); … … 388 388 } 389 389 390 object = camPendingExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string" );390 object = camPendingExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string"); 391 391 if (!object) { 392 392 exit(EXIT_FAILURE); … … 410 410 } 411 411 412 object = camProcessedExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16);412 object = camProcessedExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16); 413 413 if (!object) { 414 414 exit(EXIT_FAILURE); -
trunk/ippdb/tests/metadatafromobject.c
r12231 r12236 709 709 bool status; 710 710 711 object = chipProcessedExpRowAlloc(-64, "a string", -64, "a string", "a string", "a string", "a string" );711 object = chipProcessedExpRowAlloc(-64, "a string", -64, "a string", "a string", "a string", "a string", "a string"); 712 712 if (!object) { 713 713 exit(EXIT_FAILURE); … … 731 731 exit(EXIT_FAILURE); 732 732 } 733 if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) { 734 psFree(md); 735 exit(EXIT_FAILURE); 736 } 733 737 if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) { 734 738 psFree(md); … … 832 836 bool status; 833 837 834 object = camPendingExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string" );838 object = camPendingExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string"); 835 839 if (!object) { 836 840 exit(EXIT_FAILURE); … … 850 854 exit(EXIT_FAILURE); 851 855 } 856 if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) { 857 psFree(md); 858 exit(EXIT_FAILURE); 859 } 852 860 if (strncmp(psMetadataLookupPtr(&status, md, "label"), "a string", MAX_STRING_LENGTH)) { 853 861 psFree(md); … … 875 883 bool status; 876 884 877 object = camProcessedExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16);885 object = camProcessedExpRowAlloc(-64, -64, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, 64.64, 32.32, 32.32, -32, "a string", 32.32, 32.32, -16); 878 886 if (!object) { 879 887 exit(EXIT_FAILURE); … … 890 898 exit(EXIT_FAILURE); 891 899 } 900 psFree(md); 901 exit(EXIT_FAILURE); 902 } 903 if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) { 892 904 psFree(md); 893 905 exit(EXIT_FAILURE); -
trunk/ippdb/tests/objectfrommetadata.c
r12231 r12236 1079 1079 exit(EXIT_FAILURE); 1080 1080 } 1081 if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) { 1082 psFree(md); 1083 exit(EXIT_FAILURE); 1084 } 1081 1085 if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) { 1082 1086 psFree(md); … … 1114 1118 exit(EXIT_FAILURE); 1115 1119 } 1120 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 1121 psFree(object); 1122 exit(EXIT_FAILURE); 1123 } 1116 1124 if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) { 1117 1125 psFree(object); … … 1249 1257 exit(EXIT_FAILURE); 1250 1258 } 1259 if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) { 1260 psFree(md); 1261 exit(EXIT_FAILURE); 1262 } 1251 1263 if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) { 1252 1264 psFree(md); … … 1280 1292 exit(EXIT_FAILURE); 1281 1293 } 1294 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 1295 psFree(object); 1296 exit(EXIT_FAILURE); 1297 } 1282 1298 if (strncmp(object->label, "a string", MAX_STRING_LENGTH)) { 1283 1299 psFree(object); … … 1311 1327 exit(EXIT_FAILURE); 1312 1328 } 1329 if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) { 1330 psFree(md); 1331 exit(EXIT_FAILURE); 1332 } 1313 1333 if (!psMetadataAddStr(md, PS_LIST_TAIL, "label", 0, NULL, "a string")) { 1314 1334 psFree(md); … … 1382 1402 exit(EXIT_FAILURE); 1383 1403 } 1404 psFree(object); 1405 exit(EXIT_FAILURE); 1406 } 1407 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 1384 1408 psFree(object); 1385 1409 exit(EXIT_FAILURE);
Note:
See TracChangeset
for help on using the changeset viewer.
