Changeset 11136
- Timestamp:
- Jan 18, 2007, 2:14:55 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
-
dbconfig/config.md (modified) (1 diff)
-
ippdb/configure.ac (modified) (1 diff)
-
ippdb/src/ippdb.c (modified) (52 diffs)
-
ippdb/src/ippdb.h (modified) (15 diffs)
-
ippdb/tests/alloc.c (modified) (10 diffs)
-
ippdb/tests/insert.c (modified) (4 diffs)
-
ippdb/tests/insertobject.c (modified) (4 diffs)
-
ippdb/tests/metadatafromobject.c (modified) (11 diffs)
-
ippdb/tests/objectfrommetadata.c (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dbconfig/config.md
r11113 r11136 2 2 pkg_name STR ippdb 3 3 pkg_namespace STR ippdb 4 pkg_version STR 0.0.7 54 pkg_version STR 0.0.76 5 5 END -
trunk/ippdb/configure.ac
r11113 r11136 7 7 AC_PREREQ(2.59) 8 8 9 AC_INIT([ippdb], [0.0.7 5], [pan-starrs.ifa.hawaii.edu])9 AC_INIT([ippdb], [0.0.76], [pan-starrs.ifa.hawaii.edu]) 10 10 AC_CONFIG_SRCDIR([ippdb.pc.in]) 11 11 -
trunk/ippdb/src/ippdb.c
r11113 r11136 2799 2799 static void newExpRowFree(newExpRow *object); 2800 2800 2801 newExpRow *newExpRowAlloc(const char *exp_tag, const char *exp_id, const char *camera, const char *telescope, psTime* dateobs, const char *exp_type, psS32 imfiles )2801 newExpRow *newExpRowAlloc(const char *exp_tag, const char *exp_id, const char *camera, const char *telescope, psTime* dateobs, const char *exp_type, psS32 imfiles, const char *workdir) 2802 2802 { 2803 2803 newExpRow *_object; … … 2813 2813 _object->exp_type = psStringCopy(exp_type); 2814 2814 _object->imfiles = imfiles; 2815 _object->workdir = psStringCopy(workdir); 2815 2816 2816 2817 return _object; … … 2825 2826 psFree(object->dateobs); 2826 2827 psFree(object->exp_type); 2828 psFree(object->workdir); 2827 2829 } 2828 2830 … … 2865 2867 return false; 2866 2868 } 2869 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, "destination for output files", "255")) { 2870 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 2871 psFree(md); 2872 return false; 2873 } 2867 2874 2868 2875 bool status = psDBCreateTable(dbh, NEWEXP_TABLE_NAME, md); … … 2878 2885 } 2879 2886 2880 bool newExpInsert(psDB * dbh, const char *exp_tag, const char *exp_id, const char *camera, const char *telescope, psTime* dateobs, const char *exp_type, psS32 imfiles )2887 bool newExpInsert(psDB * dbh, const char *exp_tag, const char *exp_id, const char *camera, const char *telescope, psTime* dateobs, const char *exp_type, psS32 imfiles, const char *workdir) 2881 2888 { 2882 2889 psMetadata *md = psMetadataAlloc(); … … 2913 2920 if (!psMetadataAdd(md, PS_LIST_TAIL, "imfiles", PS_DATA_S32, NULL, imfiles)) { 2914 2921 psError(PS_ERR_UNKNOWN, false, "failed to add item imfiles"); 2922 psFree(md); 2923 return false; 2924 } 2925 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) { 2926 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 2915 2927 psFree(md); 2916 2928 return false; … … 2939 2951 bool newExpInsertObject(psDB *dbh, newExpRow *object) 2940 2952 { 2941 return newExpInsert(dbh, object->exp_tag, object->exp_id, object->camera, object->telescope, object->dateobs, object->exp_type, object->imfiles );2953 return newExpInsert(dbh, object->exp_tag, object->exp_id, object->camera, object->telescope, object->dateobs, object->exp_type, object->imfiles, object->workdir); 2942 2954 } 2943 2955 … … 3047 3059 return false; 3048 3060 } 3061 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, object->workdir)) { 3062 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 3063 psFree(md); 3064 return false; 3065 } 3049 3066 3050 3067 … … 3091 3108 return false; 3092 3109 } 3093 3094 return newExpRowAlloc(exp_tag, exp_id, camera, telescope, dateobs, exp_type, imfiles); 3110 char* workdir = psMetadataLookupPtr(&status, md, "workdir"); 3111 if (!status) { 3112 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item workdir"); 3113 return false; 3114 } 3115 3116 return newExpRowAlloc(exp_tag, exp_id, camera, telescope, dateobs, exp_type, imfiles, workdir); 3095 3117 } 3096 3118 psArray *newExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 3544 3566 static void rawExpRowFree(rawExpRow *object); 3545 3567 3546 rawExpRow *rawExpRowAlloc(const char *exp_tag, const char * camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, const char *object, psTime* dateobs, psS16 fault)3568 rawExpRow *rawExpRowAlloc(const char *exp_tag, const char *exp_id, const char *camera, const char *telescope, psTime* dateobs, const char *exp_type, psS32 imfiles, const char *workdir, const char *filter, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, const char *object, psS16 fault) 3547 3569 { 3548 3570 rawExpRow *_object; … … 3552 3574 3553 3575 _object->exp_tag = psStringCopy(exp_tag); 3576 _object->exp_id = psStringCopy(exp_id); 3554 3577 _object->camera = psStringCopy(camera); 3555 3578 _object->telescope = psStringCopy(telescope); 3579 _object->dateobs = psTimeCopy(dateobs); 3556 3580 _object->exp_type = psStringCopy(exp_type); 3557 3581 _object->imfiles = imfiles; 3582 _object->workdir = psStringCopy(workdir); 3558 3583 _object->filter = psStringCopy(filter); 3559 3584 _object->airmass = airmass; … … 3569 3594 _object->posang = posang; 3570 3595 _object->object = psStringCopy(object); 3571 _object->dateobs = psTimeCopy(dateobs);3572 3596 _object->fault = fault; 3573 3597 … … 3578 3602 { 3579 3603 psFree(object->exp_tag); 3604 psFree(object->exp_id); 3580 3605 psFree(object->camera); 3581 3606 psFree(object->telescope); 3607 psFree(object->dateobs); 3582 3608 psFree(object->exp_type); 3609 psFree(object->workdir); 3583 3610 psFree(object->filter); 3584 3611 psFree(object->object); 3585 psFree(object->dateobs);3586 3612 } 3587 3613 … … 3594 3620 return false; 3595 3621 } 3622 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_id", PS_DATA_STRING, "Key", "64")) { 3623 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id"); 3624 psFree(md); 3625 return false; 3626 } 3596 3627 if (!psMetadataAdd(md, PS_LIST_TAIL, "camera", PS_DATA_STRING, NULL, "64")) { 3597 3628 psError(PS_ERR_UNKNOWN, false, "failed to add item camera"); … … 3604 3635 return false; 3605 3636 } 3637 if (!psMetadataAdd(md, PS_LIST_TAIL, "dateobs", PS_DATA_TIME, NULL, NULL)) { 3638 psError(PS_ERR_UNKNOWN, false, "failed to add item dateobs"); 3639 psFree(md); 3640 return false; 3641 } 3606 3642 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_type", PS_DATA_STRING, NULL, "64")) { 3607 3643 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_type"); … … 3614 3650 return false; 3615 3651 } 3652 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, "destination for output files", "255")) { 3653 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 3654 psFree(md); 3655 return false; 3656 } 3616 3657 if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, "64")) { 3617 3658 psError(PS_ERR_UNKNOWN, false, "failed to add item filter"); … … 3679 3720 return false; 3680 3721 } 3681 if (!psMetadataAdd(md, PS_LIST_TAIL, "dateobs", PS_DATA_TIME, NULL, NULL)) {3682 psError(PS_ERR_UNKNOWN, false, "failed to add item dateobs");3683 psFree(md);3684 return false;3685 }3686 3722 if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, "NOT NULL", 0)) { 3687 3723 psError(PS_ERR_UNKNOWN, false, "failed to add item fault"); … … 3702 3738 } 3703 3739 3704 bool rawExpInsert(psDB * dbh, const char *exp_tag, const char * camera, const char *telescope, const char *exp_type, psS32 imfiles, const char *filter, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, const char *object, psTime* dateobs, psS16 fault)3740 bool rawExpInsert(psDB * dbh, const char *exp_tag, const char *exp_id, const char *camera, const char *telescope, psTime* dateobs, const char *exp_type, psS32 imfiles, const char *workdir, const char *filter, psF32 airmass, psF64 ra, psF64 decl, psF32 exp_time, psF64 bg, psF64 bg_stdev, psF64 bg_mean_stdev, psF64 alt, psF64 az, psF32 ccd_temp, psF64 posang, const char *object, psS16 fault) 3705 3741 { 3706 3742 psMetadata *md = psMetadataAlloc(); … … 3710 3746 return false; 3711 3747 } 3748 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_id", PS_DATA_STRING, NULL, exp_id)) { 3749 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id"); 3750 psFree(md); 3751 return false; 3752 } 3712 3753 if (!psMetadataAdd(md, PS_LIST_TAIL, "camera", PS_DATA_STRING, NULL, camera)) { 3713 3754 psError(PS_ERR_UNKNOWN, false, "failed to add item camera"); … … 3720 3761 return false; 3721 3762 } 3763 if (!psMetadataAdd(md, PS_LIST_TAIL, "dateobs", PS_DATA_TIME, NULL, dateobs)) { 3764 psError(PS_ERR_UNKNOWN, false, "failed to add item dateobs"); 3765 psFree(md); 3766 return false; 3767 } 3722 3768 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_type", PS_DATA_STRING, NULL, exp_type)) { 3723 3769 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_type"); … … 3730 3776 return false; 3731 3777 } 3778 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) { 3779 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 3780 psFree(md); 3781 return false; 3782 } 3732 3783 if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, filter)) { 3733 3784 psError(PS_ERR_UNKNOWN, false, "failed to add item filter"); … … 3792 3843 if (!psMetadataAdd(md, PS_LIST_TAIL, "object", PS_DATA_STRING, NULL, object)) { 3793 3844 psError(PS_ERR_UNKNOWN, false, "failed to add item object"); 3794 psFree(md);3795 return false;3796 }3797 if (!psMetadataAdd(md, PS_LIST_TAIL, "dateobs", PS_DATA_TIME, NULL, dateobs)) {3798 psError(PS_ERR_UNKNOWN, false, "failed to add item dateobs");3799 3845 psFree(md); 3800 3846 return false; … … 3828 3874 bool rawExpInsertObject(psDB *dbh, rawExpRow *object) 3829 3875 { 3830 return rawExpInsert(dbh, object->exp_tag, object-> camera, object->telescope, object->exp_type, object->imfiles, object->filter, object->airmass, object->ra, object->decl, object->exp_time, object->bg, object->bg_stdev, object->bg_mean_stdev, object->alt, object->az, object->ccd_temp, object->posang, object->object, object->dateobs, object->fault);3876 return rawExpInsert(dbh, object->exp_tag, object->exp_id, object->camera, object->telescope, object->dateobs, object->exp_type, object->imfiles, object->workdir, object->filter, object->airmass, object->ra, object->decl, object->exp_time, object->bg, object->bg_stdev, object->bg_mean_stdev, object->alt, object->az, object->ccd_temp, object->posang, object->object, object->fault); 3831 3877 } 3832 3878 … … 3906 3952 return false; 3907 3953 } 3954 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_id", PS_DATA_STRING, NULL, object->exp_id)) { 3955 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id"); 3956 psFree(md); 3957 return false; 3958 } 3908 3959 if (!psMetadataAdd(md, PS_LIST_TAIL, "camera", PS_DATA_STRING, NULL, object->camera)) { 3909 3960 psError(PS_ERR_UNKNOWN, false, "failed to add item camera"); … … 3916 3967 return false; 3917 3968 } 3969 if (!psMetadataAdd(md, PS_LIST_TAIL, "dateobs", PS_DATA_TIME, NULL, object->dateobs)) { 3970 psError(PS_ERR_UNKNOWN, false, "failed to add item dateobs"); 3971 psFree(md); 3972 return false; 3973 } 3918 3974 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_type", PS_DATA_STRING, NULL, object->exp_type)) { 3919 3975 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_type"); … … 3926 3982 return false; 3927 3983 } 3984 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, object->workdir)) { 3985 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 3986 psFree(md); 3987 return false; 3988 } 3928 3989 if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, object->filter)) { 3929 3990 psError(PS_ERR_UNKNOWN, false, "failed to add item filter"); … … 3991 4052 return false; 3992 4053 } 3993 if (!psMetadataAdd(md, PS_LIST_TAIL, "dateobs", PS_DATA_TIME, NULL, object->dateobs)) {3994 psError(PS_ERR_UNKNOWN, false, "failed to add item dateobs");3995 psFree(md);3996 return false;3997 }3998 4054 if (!psMetadataAdd(md, PS_LIST_TAIL, "fault", PS_DATA_S16, NULL, object->fault)) { 3999 4055 psError(PS_ERR_UNKNOWN, false, "failed to add item fault"); … … 4015 4071 return false; 4016 4072 } 4073 char* exp_id = psMetadataLookupPtr(&status, md, "exp_id"); 4074 if (!status) { 4075 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item exp_id"); 4076 return false; 4077 } 4017 4078 char* camera = psMetadataLookupPtr(&status, md, "camera"); 4018 4079 if (!status) { … … 4025 4086 return false; 4026 4087 } 4088 psTime* dateobs = psMetadataLookupPtr(&status, md, "dateobs"); 4089 if (!status) { 4090 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dateobs"); 4091 return false; 4092 } 4027 4093 char* exp_type = psMetadataLookupPtr(&status, md, "exp_type"); 4028 4094 if (!status) { … … 4035 4101 return false; 4036 4102 } 4103 char* workdir = psMetadataLookupPtr(&status, md, "workdir"); 4104 if (!status) { 4105 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item workdir"); 4106 return false; 4107 } 4037 4108 char* filter = psMetadataLookupPtr(&status, md, "filter"); 4038 4109 if (!status) { … … 4100 4171 return false; 4101 4172 } 4102 psTime* dateobs = psMetadataLookupPtr(&status, md, "dateobs");4103 if (!status) {4104 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item dateobs");4105 return false;4106 }4107 4173 psS16 fault = psMetadataLookupS16(&status, md, "fault"); 4108 4174 if (!status) { … … 4111 4177 } 4112 4178 4113 return rawExpRowAlloc(exp_tag, camera, telescope, exp_type, imfiles, filter, airmass, ra, decl, exp_time, bg, bg_stdev, bg_mean_stdev, alt, az, ccd_temp, posang, object, dateobs, fault);4179 return rawExpRowAlloc(exp_tag, exp_id, camera, telescope, dateobs, exp_type, imfiles, workdir, filter, airmass, ra, decl, exp_time, bg, bg_stdev, bg_mean_stdev, alt, az, ccd_temp, posang, object, fault); 4114 4180 } 4115 4181 psArray *rawExpSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 8311 8377 static void detRunRowFree(detRunRow *object); 8312 8378 8313 detRunRow *detRunRowAlloc(psS32 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *exp_type, const char * filter, psF32 airmass, psF32 exp_time, psF32 ccd_temp, psF64 posang, const char *object, psTime* registered, psTime* use_begin, psTime* use_end)8379 detRunRow *detRunRowAlloc(psS32 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *exp_type, const char *workdir, const char *filter, psF32 airmass, psF32 exp_time, psF32 ccd_temp, psF64 posang, const char *object, psTime* registered, psTime* use_begin, psTime* use_end) 8314 8380 { 8315 8381 detRunRow *_object; … … 8324 8390 _object->state = psStringCopy(state); 8325 8391 _object->exp_type = psStringCopy(exp_type); 8392 _object->workdir = psStringCopy(workdir); 8326 8393 _object->filter = psStringCopy(filter); 8327 8394 _object->airmass = airmass; … … 8343 8410 psFree(object->state); 8344 8411 psFree(object->exp_type); 8412 psFree(object->workdir); 8345 8413 psFree(object->filter); 8346 8414 psFree(object->object); … … 8383 8451 return false; 8384 8452 } 8453 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, "destination for output files", "255")) { 8454 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 8455 psFree(md); 8456 return false; 8457 } 8385 8458 if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, "64")) { 8386 8459 psError(PS_ERR_UNKNOWN, false, "failed to add item filter"); … … 8441 8514 } 8442 8515 8443 bool detRunInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *exp_type, const char * filter, psF32 airmass, psF32 exp_time, psF32 ccd_temp, psF64 posang, const char *object, psTime* registered, psTime* use_begin, psTime* use_end)8516 bool detRunInsert(psDB * dbh, psS32 det_id, psS32 iteration, const char *det_type, const char *mode, const char *state, const char *exp_type, const char *workdir, const char *filter, psF32 airmass, psF32 exp_time, psF32 ccd_temp, psF64 posang, const char *object, psTime* registered, psTime* use_begin, psTime* use_end) 8444 8517 { 8445 8518 psMetadata *md = psMetadataAlloc(); … … 8471 8544 if (!psMetadataAdd(md, PS_LIST_TAIL, "exp_type", PS_DATA_STRING, NULL, exp_type)) { 8472 8545 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_type"); 8546 psFree(md); 8547 return false; 8548 } 8549 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) { 8550 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 8473 8551 psFree(md); 8474 8552 return false; … … 8542 8620 bool detRunInsertObject(psDB *dbh, detRunRow *object) 8543 8621 { 8544 return detRunInsert(dbh, object->det_id, object->iteration, object->det_type, object->mode, object->state, object->exp_type, object-> filter, object->airmass, object->exp_time, object->ccd_temp, object->posang, object->object, object->registered, object->use_begin, object->use_end);8622 return detRunInsert(dbh, object->det_id, object->iteration, object->det_type, object->mode, object->state, object->exp_type, object->workdir, object->filter, object->airmass, object->exp_time, object->ccd_temp, object->posang, object->object, object->registered, object->use_begin, object->use_end); 8545 8623 } 8546 8624 … … 8645 8723 return false; 8646 8724 } 8725 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, object->workdir)) { 8726 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 8727 psFree(md); 8728 return false; 8729 } 8647 8730 if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, object->filter)) { 8648 8731 psError(PS_ERR_UNKNOWN, false, "failed to add item filter"); … … 8729 8812 return false; 8730 8813 } 8814 char* workdir = psMetadataLookupPtr(&status, md, "workdir"); 8815 if (!status) { 8816 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item workdir"); 8817 return false; 8818 } 8731 8819 char* filter = psMetadataLookupPtr(&status, md, "filter"); 8732 8820 if (!status) { … … 8775 8863 } 8776 8864 8777 return detRunRowAlloc(det_id, iteration, det_type, mode, state, exp_type, filter, airmass, exp_time, ccd_temp, posang, object, registered, use_begin, use_end);8865 return detRunRowAlloc(det_id, iteration, det_type, mode, state, exp_type, workdir, filter, airmass, exp_time, ccd_temp, posang, object, registered, use_begin, use_end); 8778 8866 } 8779 8867 psArray *detRunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) … … 13266 13354 static void p4RunRowFree(p4RunRow *object); 13267 13355 13268 p4RunRow *p4RunRowAlloc(psS32 p4_id, const char *survey_mode, const char *state, const char * filter, const char *skycell_id, const char *tess_id, psF64 ra, psF64 decl, const char *input_ss, const char *output_ss)13356 p4RunRow *p4RunRowAlloc(psS32 p4_id, const char *survey_mode, const char *state, const char *workdir, const char *filter, const char *skycell_id, const char *tess_id, psF64 ra, psF64 decl, const char *input_ss, const char *output_ss) 13269 13357 { 13270 13358 p4RunRow *_object; … … 13276 13364 _object->survey_mode = psStringCopy(survey_mode); 13277 13365 _object->state = psStringCopy(state); 13366 _object->workdir = psStringCopy(workdir); 13278 13367 _object->filter = psStringCopy(filter); 13279 13368 _object->skycell_id = psStringCopy(skycell_id); … … 13291 13380 psFree(object->survey_mode); 13292 13381 psFree(object->state); 13382 psFree(object->workdir); 13293 13383 psFree(object->filter); 13294 13384 psFree(object->skycell_id); … … 13316 13406 return false; 13317 13407 } 13408 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, "255")) { 13409 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 13410 psFree(md); 13411 return false; 13412 } 13318 13413 if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, "64")) { 13319 13414 psError(PS_ERR_UNKNOWN, false, "failed to add item filter"); … … 13364 13459 } 13365 13460 13366 bool p4RunInsert(psDB * dbh, psS32 p4_id, const char *survey_mode, const char *state, const char * filter, const char *skycell_id, const char *tess_id, psF64 ra, psF64 decl, const char *input_ss, const char *output_ss)13461 bool p4RunInsert(psDB * dbh, psS32 p4_id, const char *survey_mode, const char *state, const char *workdir, const char *filter, const char *skycell_id, const char *tess_id, psF64 ra, psF64 decl, const char *input_ss, const char *output_ss) 13367 13462 { 13368 13463 psMetadata *md = psMetadataAlloc(); … … 13379 13474 if (!psMetadataAdd(md, PS_LIST_TAIL, "state", PS_DATA_STRING, NULL, state)) { 13380 13475 psError(PS_ERR_UNKNOWN, false, "failed to add item state"); 13476 psFree(md); 13477 return false; 13478 } 13479 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, workdir)) { 13480 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 13381 13481 psFree(md); 13382 13482 return false; … … 13440 13540 bool p4RunInsertObject(psDB *dbh, p4RunRow *object) 13441 13541 { 13442 return p4RunInsert(dbh, object->p4_id, object->survey_mode, object->state, object-> filter, object->skycell_id, object->tess_id, object->ra, object->decl, object->input_ss, object->output_ss);13542 return p4RunInsert(dbh, object->p4_id, object->survey_mode, object->state, object->workdir, object->filter, object->skycell_id, object->tess_id, object->ra, object->decl, object->input_ss, object->output_ss); 13443 13543 } 13444 13544 … … 13528 13628 return false; 13529 13629 } 13630 if (!psMetadataAdd(md, PS_LIST_TAIL, "workdir", PS_DATA_STRING, NULL, object->workdir)) { 13631 psError(PS_ERR_UNKNOWN, false, "failed to add item workdir"); 13632 psFree(md); 13633 return false; 13634 } 13530 13635 if (!psMetadataAdd(md, PS_LIST_TAIL, "filter", PS_DATA_STRING, NULL, object->filter)) { 13531 13636 psError(PS_ERR_UNKNOWN, false, "failed to add item filter"); … … 13587 13692 return false; 13588 13693 } 13694 char* workdir = psMetadataLookupPtr(&status, md, "workdir"); 13695 if (!status) { 13696 psError(PS_ERR_UNKNOWN, true, "failed to lookup value for item workdir"); 13697 return false; 13698 } 13589 13699 char* filter = psMetadataLookupPtr(&status, md, "filter"); 13590 13700 if (!status) { … … 13623 13733 } 13624 13734 13625 return p4RunRowAlloc(p4_id, survey_mode, state, filter, skycell_id, tess_id, ra, decl, input_ss, output_ss);13735 return p4RunRowAlloc(p4_id, survey_mode, state, workdir, filter, skycell_id, tess_id, ra, decl, input_ss, output_ss); 13626 13736 } 13627 13737 psArray *p4RunSelectRowObjects(psDB *dbh, const psMetadata *where, unsigned long long limit) -
trunk/ippdb/src/ippdb.h
r11113 r11136 1590 1590 char *exp_type; 1591 1591 psS32 imfiles; 1592 char *workdir; 1592 1593 } newExpRow; 1593 1594 … … 1604 1605 psTime* dateobs, 1605 1606 const char *exp_type, 1606 psS32 imfiles 1607 psS32 imfiles, 1608 const char *workdir 1607 1609 ); 1608 1610 … … 1640 1642 psTime* dateobs, 1641 1643 const char *exp_type, 1642 psS32 imfiles 1644 psS32 imfiles, 1645 const char *workdir 1643 1646 ); 1644 1647 … … 2001 2004 typedef struct { 2002 2005 char *exp_tag; 2006 char *exp_id; 2003 2007 char *camera; 2004 2008 char *telescope; 2009 psTime* dateobs; 2005 2010 char *exp_type; 2006 2011 psS32 imfiles; 2012 char *workdir; 2007 2013 char *filter; 2008 2014 psF32 airmass; … … 2018 2024 psF64 posang; 2019 2025 char *object; 2020 psTime* dateobs;2021 2026 psS16 fault; 2022 2027 } rawExpRow; … … 2029 2034 rawExpRow *rawExpRowAlloc( 2030 2035 const char *exp_tag, 2036 const char *exp_id, 2031 2037 const char *camera, 2032 2038 const char *telescope, 2039 psTime* dateobs, 2033 2040 const char *exp_type, 2034 2041 psS32 imfiles, 2042 const char *workdir, 2035 2043 const char *filter, 2036 2044 psF32 airmass, … … 2046 2054 psF64 posang, 2047 2055 const char *object, 2048 psTime* dateobs,2049 2056 psS16 fault 2050 2057 ); … … 2078 2085 psDB *dbh, ///< Database handle 2079 2086 const char *exp_tag, 2087 const char *exp_id, 2080 2088 const char *camera, 2081 2089 const char *telescope, 2090 psTime* dateobs, 2082 2091 const char *exp_type, 2083 2092 psS32 imfiles, 2093 const char *workdir, 2084 2094 const char *filter, 2085 2095 psF32 airmass, … … 2095 2105 psF64 posang, 2096 2106 const char *object, 2097 psTime* dateobs,2098 2107 psS16 fault 2099 2108 ); … … 4397 4406 char *state; 4398 4407 char *exp_type; 4408 char *workdir; 4399 4409 char *filter; 4400 4410 psF32 airmass; … … 4420 4430 const char *state, 4421 4431 const char *exp_type, 4432 const char *workdir, 4422 4433 const char *filter, 4423 4434 psF32 airmass, … … 4464 4475 const char *state, 4465 4476 const char *exp_type, 4477 const char *workdir, 4466 4478 const char *filter, 4467 4479 psF32 airmass, … … 6812 6824 char *survey_mode; 6813 6825 char *state; 6826 char *workdir; 6814 6827 char *filter; 6815 6828 char *skycell_id; … … 6830 6843 const char *survey_mode, 6831 6844 const char *state, 6845 const char *workdir, 6832 6846 const char *filter, 6833 6847 const char *skycell_id, … … 6869 6883 const char *survey_mode, 6870 6884 const char *state, 6885 const char *workdir, 6871 6886 const char *filter, 6872 6887 const char *skycell_id, -
trunk/ippdb/tests/alloc.c
r11113 r11136 244 244 newExpRow *object; 245 245 246 object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32 );246 object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string" ); 247 247 248 248 if (!object) { … … 277 277 exit(EXIT_FAILURE); 278 278 } 279 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 280 psFree(object); 281 exit(EXIT_FAILURE); 282 } 279 283 280 284 psFree(object); … … 313 317 rawExpRow *object; 314 318 315 object = rawExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", -16 ); 316 317 if (!object) { 318 exit(EXIT_FAILURE); 319 } 320 321 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 319 object = rawExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", -16 ); 320 321 if (!object) { 322 exit(EXIT_FAILURE); 323 } 324 325 if (strncmp(object->exp_tag, "a string", MAX_STRING_LENGTH)) { 326 psFree(object); 327 exit(EXIT_FAILURE); 328 } 329 if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) { 322 330 psFree(object); 323 331 exit(EXIT_FAILURE); … … 331 339 exit(EXIT_FAILURE); 332 340 } 341 psFree(object); 342 exit(EXIT_FAILURE); 343 } 333 344 if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) { 334 345 psFree(object); … … 339 350 exit(EXIT_FAILURE); 340 351 } 352 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 353 psFree(object); 354 exit(EXIT_FAILURE); 355 } 341 356 if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) { 342 357 psFree(object); … … 394 409 exit(EXIT_FAILURE); 395 410 } 396 psFree(object);397 exit(EXIT_FAILURE);398 }399 411 400 412 psFree(object); … … 822 834 detRunRow *object; 823 835 824 object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z" );836 object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z" ); 825 837 826 838 if (!object) { … … 852 864 exit(EXIT_FAILURE); 853 865 } 866 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 867 psFree(object); 868 exit(EXIT_FAILURE); 869 } 854 870 if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) { 855 871 psFree(object); … … 1361 1377 p4RunRow *object; 1362 1378 1363 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string" );1379 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string" ); 1364 1380 1365 1381 if (!object) { … … 1376 1392 } 1377 1393 if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) { 1394 psFree(object); 1395 exit(EXIT_FAILURE); 1396 } 1397 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 1378 1398 psFree(object); 1379 1399 exit(EXIT_FAILURE); -
trunk/ippdb/tests/insert.c
r11113 r11136 118 118 } 119 119 120 if (!newExpInsert(dbh, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32 )) {120 if (!newExpInsert(dbh, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string")) { 121 121 exit(EXIT_FAILURE); 122 122 } … … 148 148 } 149 149 150 if (!rawExpInsert(dbh, "a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", -16)) {150 if (!rawExpInsert(dbh, "a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", -16)) { 151 151 exit(EXIT_FAILURE); 152 152 } … … 313 313 } 314 314 315 if (!detRunInsert(dbh, -32, -32, "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z")) {315 if (!detRunInsert(dbh, -32, -32, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z")) { 316 316 exit(EXIT_FAILURE); 317 317 } … … 478 478 } 479 479 480 if (!p4RunInsert(dbh, -32, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string")) {480 if (!p4RunInsert(dbh, -32, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string")) { 481 481 exit(EXIT_FAILURE); 482 482 } -
trunk/ippdb/tests/insertobject.c
r11113 r11136 168 168 } 169 169 170 object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32 );170 object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string"); 171 171 if (!object) { 172 172 exit(EXIT_FAILURE); … … 212 212 } 213 213 214 object = rawExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", -16);214 object = rawExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", -16); 215 215 if (!object) { 216 216 exit(EXIT_FAILURE); … … 454 454 } 455 455 456 object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z");456 object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z"); 457 457 if (!object) { 458 458 exit(EXIT_FAILURE); … … 696 696 } 697 697 698 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string");698 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string"); 699 699 if (!object) { 700 700 exit(EXIT_FAILURE); -
trunk/ippdb/tests/metadatafromobject.c
r11113 r11136 302 302 bool status; 303 303 304 object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32 );304 object = newExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string"); 305 305 if (!object) { 306 306 exit(EXIT_FAILURE); … … 341 341 exit(EXIT_FAILURE); 342 342 } 343 if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) { 344 psFree(md); 345 exit(EXIT_FAILURE); 346 } 343 347 344 348 psFree(md); … … 387 391 bool status; 388 392 389 object = rawExpRowAlloc("a string", "a string", "a string", "a string", -32, "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", -16);393 object = rawExpRowAlloc("a string", "a string", "a string", "a string", "0001-01-01T00:00:00Z", "a string", -32, "a string", "a string", 32.32, 64.64, 64.64, 32.32, 64.64, 64.64, 64.64, 64.64, 64.64, 32.32, 64.64, "a string", -16); 390 394 if (!object) { 391 395 exit(EXIT_FAILURE); … … 403 407 exit(EXIT_FAILURE); 404 408 } 409 if (strncmp(psMetadataLookupPtr(&status, md, "exp_id"), "a string", MAX_STRING_LENGTH)) { 410 psFree(md); 411 exit(EXIT_FAILURE); 412 } 405 413 if (strncmp(psMetadataLookupPtr(&status, md, "camera"), "a string", MAX_STRING_LENGTH)) { 406 414 psFree(md); … … 411 419 exit(EXIT_FAILURE); 412 420 } 421 psFree(md); 422 exit(EXIT_FAILURE); 423 } 413 424 if (strncmp(psMetadataLookupPtr(&status, md, "exp_type"), "a string", MAX_STRING_LENGTH)) { 414 425 psFree(md); … … 419 430 exit(EXIT_FAILURE); 420 431 } 432 if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) { 433 psFree(md); 434 exit(EXIT_FAILURE); 435 } 421 436 if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) { 422 437 psFree(md); … … 474 489 exit(EXIT_FAILURE); 475 490 } 476 psFree(md);477 exit(EXIT_FAILURE);478 }479 491 480 492 psFree(md); … … 984 996 bool status; 985 997 986 object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z");998 object = detRunRowAlloc(-32, -32, "a string", "a string", "a string", "a string", "a string", "a string", 32.32, 32.32, 32.32, 64.64, "a string", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z", "0001-01-01T00:00:00Z"); 987 999 if (!object) { 988 1000 exit(EXIT_FAILURE); … … 1020 1032 exit(EXIT_FAILURE); 1021 1033 } 1034 if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) { 1035 psFree(md); 1036 exit(EXIT_FAILURE); 1037 } 1022 1038 if (strncmp(psMetadataLookupPtr(&status, md, "filter"), "a string", MAX_STRING_LENGTH)) { 1023 1039 psFree(md); … … 1611 1627 bool status; 1612 1628 1613 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string");1629 object = p4RunRowAlloc(-32, "a string", "a string", "a string", "a string", "a string", "a string", 64.64, 64.64, "a string", "a string"); 1614 1630 if (!object) { 1615 1631 exit(EXIT_FAILURE); … … 1632 1648 } 1633 1649 if (strncmp(psMetadataLookupPtr(&status, md, "state"), "a string", MAX_STRING_LENGTH)) { 1650 psFree(md); 1651 exit(EXIT_FAILURE); 1652 } 1653 if (strncmp(psMetadataLookupPtr(&status, md, "workdir"), "a string", MAX_STRING_LENGTH)) { 1634 1654 psFree(md); 1635 1655 exit(EXIT_FAILURE); -
trunk/ippdb/tests/objectfrommetadata.c
r11113 r11136 450 450 exit(EXIT_FAILURE); 451 451 } 452 if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) { 453 psFree(md); 454 exit(EXIT_FAILURE); 455 } 452 456 453 457 object = newExpObjectFromMetadata(md); … … 486 490 exit(EXIT_FAILURE); 487 491 } 492 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 493 psFree(object); 494 exit(EXIT_FAILURE); 495 } 488 496 489 497 psFree(object); … … 549 557 exit(EXIT_FAILURE); 550 558 } 559 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_id", 0, NULL, "a string")) { 560 psFree(md); 561 exit(EXIT_FAILURE); 562 } 551 563 if (!psMetadataAddStr(md, PS_LIST_TAIL, "camera", 0, NULL, "a string")) { 552 564 psFree(md); … … 557 569 exit(EXIT_FAILURE); 558 570 } 571 psFree(md); 572 exit(EXIT_FAILURE); 573 } 559 574 if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_type", 0, NULL, "a string")) { 560 575 psFree(md); … … 565 580 exit(EXIT_FAILURE); 566 581 } 582 if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) { 583 psFree(md); 584 exit(EXIT_FAILURE); 585 } 567 586 if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) { 568 587 psFree(md); … … 620 639 exit(EXIT_FAILURE); 621 640 } 622 psFree(md);623 exit(EXIT_FAILURE);624 }625 641 626 642 object = rawExpObjectFromMetadata(md); … … 636 652 exit(EXIT_FAILURE); 637 653 } 654 if (strncmp(object->exp_id, "a string", MAX_STRING_LENGTH)) { 655 psFree(object); 656 exit(EXIT_FAILURE); 657 } 638 658 if (strncmp(object->camera, "a string", MAX_STRING_LENGTH)) { 639 659 psFree(object); … … 644 664 exit(EXIT_FAILURE); 645 665 } 666 psFree(object); 667 exit(EXIT_FAILURE); 668 } 646 669 if (strncmp(object->exp_type, "a string", MAX_STRING_LENGTH)) { 647 670 psFree(object); … … 652 675 exit(EXIT_FAILURE); 653 676 } 677 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 678 psFree(object); 679 exit(EXIT_FAILURE); 680 } 654 681 if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) { 655 682 psFree(object); … … 707 734 exit(EXIT_FAILURE); 708 735 } 709 psFree(object);710 exit(EXIT_FAILURE);711 }712 736 713 737 psFree(object); … … 1499 1523 exit(EXIT_FAILURE); 1500 1524 } 1525 if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) { 1526 psFree(md); 1527 exit(EXIT_FAILURE); 1528 } 1501 1529 if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) { 1502 1530 psFree(md); … … 1565 1593 exit(EXIT_FAILURE); 1566 1594 } 1595 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 1596 psFree(object); 1597 exit(EXIT_FAILURE); 1598 } 1567 1599 if (strncmp(object->filter, "a string", MAX_STRING_LENGTH)) { 1568 1600 psFree(object); … … 2477 2509 exit(EXIT_FAILURE); 2478 2510 } 2511 if (!psMetadataAddStr(md, PS_LIST_TAIL, "workdir", 0, NULL, "a string")) { 2512 psFree(md); 2513 exit(EXIT_FAILURE); 2514 } 2479 2515 if (!psMetadataAddStr(md, PS_LIST_TAIL, "filter", 0, NULL, "a string")) { 2480 2516 psFree(md); … … 2523 2559 } 2524 2560 if (strncmp(object->state, "a string", MAX_STRING_LENGTH)) { 2561 psFree(object); 2562 exit(EXIT_FAILURE); 2563 } 2564 if (strncmp(object->workdir, "a string", MAX_STRING_LENGTH)) { 2525 2565 psFree(object); 2526 2566 exit(EXIT_FAILURE);
Note:
See TracChangeset
for help on using the changeset viewer.
