[Arsperl-devel] ARSperl ARS.pm, 1.74, 1.75 ARS.xs, 1.119, 1.120 Makefile.PL, 1.80, 1.81 changes.dat
Brought to you by:
jeffmurphy
From: Thilo S. <ts...@us...> - 2008-11-03 20:19:19
|
Update of /cvsroot/arsperl/ARSperl In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv30448 Modified Files: ARS.pm ARS.xs Makefile.PL changes.dat Log Message: ars_GetListContainer improvement Index: changes.dat =================================================================== RCS file: /cvsroot/arsperl/ARSperl/changes.dat,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** changes.dat 24 Sep 2008 13:03:08 -0000 1.59 --- changes.dat 3 Nov 2008 17:08:19 -0000 1.60 *************** *** 1,3 **** --- 1,7 ---- released=xx/xx/xxx version=1.92 + TS fixed return value of ars_Import + TS fixed memory violation in ars_GetListContainer + TS implemented ars_qualifier_ptr function (inverse of ars_perl_qualifier) + TS added ownerObjList parameter to ars_GetListContainer TS fixed AR_SERVER_INFO type identification in infra/exsi.pl TS updated version numbers in INSTALLATION Index: ARS.xs =================================================================== RCS file: /cvsroot/arsperl/ARSperl/ARS.xs,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** ARS.xs 15 May 2008 18:30:00 -0000 1.119 --- ARS.xs 3 Nov 2008 17:08:18 -0000 1.120 *************** *** 90,93 **** --- 90,137 ---- ARQualifierStruct * + ars_qualifier_ptr(ctrl, in) + ARControlStruct * ctrl + SV * in + CODE: + { + ARQualifierStruct *qual; + HV *h_dummy; + HV *h; + int rv = 0; + + AMALLOCNN(qual, 1, ARQualifierStruct); + (void) ARError_reset(); + + if( SvTYPE(SvRV(in)) != SVt_PVHV ){ + ARError_add( AR_RETURN_ERROR, AP_ERR_GENERAL, "rev_ARQualifierStruct: not a hash value" ); + RETVAL = NULL; + goto ars_qualifier_ptr_end; + } + h = (HV* ) SvRV((SV*) in); + if( ! SvTRUE(hv_scalar(h)) ){ + RETVAL = qual; + goto ars_qualifier_ptr_end; + } + + h_dummy = newHV(); + SvREFCNT_inc( in ); + hv_store( h_dummy, "_", 1, in, 0 ); + rv += rev_ARQualifierStruct( ctrl, h_dummy, "_", qual ); + hv_undef( h_dummy ); + + if( rv == 0 ){ + RETVAL = qual; + }else{ + ARError_add( AR_RETURN_ERROR, AP_ERR_PREREVFAIL ); + RETVAL = NULL; + FreeARQualifierStruct(qual, TRUE); + } + ars_qualifier_ptr_end:; + } + OUTPUT: + RETVAL + + + ARQualifierStruct * ars_LoadQualifier(ctrl,schema,qualstring,displayTag=NULL) ARControlStruct * ctrl *************** *** 1093,1104 **** { ARStatusList status; ! int i, ret; (void) ARError_reset(); Zero(&status, 1, ARStatusList); #if AR_EXPORT_VERSION >= 4 ! if(items < 4) (void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS); ! else { ARContainerTypeList containerTypes; int count; --- 1137,1148 ---- { ARStatusList status; ! int i, ret, rv = 0; (void) ARError_reset(); Zero(&status, 1, ARStatusList); #if AR_EXPORT_VERSION >= 4 ! if(items < 1 || items > 200){ /* don't overflow clist[] */ (void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS); ! }else{ ARContainerTypeList containerTypes; int count; *************** *** 1106,1114 **** unsigned # endif ! int clist[ARCON_LAST_RESERVED]; # if AR_EXPORT_VERSION >= 6 ARContainerOwnerObjList ownerObjList; - # else - ARContainerOwnerObj ownerObj; # endif # if AR_EXPORT_VERSION >= 8L --- 1150,1156 ---- unsigned # endif ! int clist[256]; # if AR_EXPORT_VERSION >= 6 ARContainerOwnerObjList ownerObjList; # endif # if AR_EXPORT_VERSION >= 8L *************** *** 1117,1134 **** ARContainerInfoList conList; ! count = 0; ! for(i = 3 ; i < items ; i++) { ! clist[count++] = SvIV(ST(i)); ! } ! containerTypes.numItems = count; ! containerTypes.type = clist; # if AR_EXPORT_VERSION >= 6 ! ownerObjList.numItems = 0; ! ownerObjList.ownerObjList = NULL; # endif # if AR_EXPORT_VERSION >= 8L Zero(&propList, 1, ARPropList); # endif ! ret = ARGetListContainer(ctrl, changedSince, &containerTypes, attributes, --- 1159,1194 ---- ARContainerInfoList conList; ! Zero(&containerTypes, 1, ARContainerTypeList); # if AR_EXPORT_VERSION >= 6 ! Zero(&ownerObjList, 1, ARContainerOwnerObjList); # endif # if AR_EXPORT_VERSION >= 8L Zero(&propList, 1, ARPropList); # endif ! Zero(&conList, 1, ARContainerInfoList); ! ! count = 0; ! ! if( items >= 4 ){ ! SV* st3 = ST(3); ! if( SvROK(st3) && SvTYPE(SvRV(st3)) == SVt_PVAV ){ ! HV *h_dummy = newHV(); ! SvREFCNT_inc( st3 ); ! hv_store( h_dummy, "_", 1, st3, 0 ); ! rv += rev_ARContainerOwnerObjList( ctrl, h_dummy, "_", &ownerObjList ); ! hv_undef( h_dummy ); ! }else{ ! clist[count++] = SvIV(st3); ! } ! } ! ! for(i = 4 ; i < items ; ++i){ ! clist[count++] = SvIV(ST(i)); ! } ! containerTypes.numItems = count; ! containerTypes.type = clist; ! ! if( rv == 0 ){ ! ret = ARGetListContainer(ctrl, changedSince, &containerTypes, attributes, *************** *** 1143,1147 **** &conList, &status); ! if(!ARError(ret, status)) { unsigned int i; for(i = 0 ; i < conList.numItems ; i++) { --- 1203,1211 ---- &conList, &status); ! }else{ ! ARError_add( AR_RETURN_ERROR, AP_ERR_PREREVFAIL); ! } ! ! if( rv == 0 && !ARError(ret, status)) { unsigned int i; for(i = 0 ; i < conList.numItems ; i++) { *************** *** 1169,1173 **** } # if AR_EXPORT_VERSION >= 5L ! FreeARContainerTypeList(&containerTypes, FALSE); # endif FreeARContainerInfoList(&conList, FALSE); --- 1233,1238 ---- } # if AR_EXPORT_VERSION >= 5L ! /* Don't try to FreeAR this, because clist[] is a stack variable */ ! /* FreeARContainerTypeList(&containerTypes, FALSE); */ # endif FreeARContainerInfoList(&conList, FALSE); *************** *** 2394,2398 **** CODE: { ! int ret = 1, i = 0, a = 0, c = (items - 2) / 2, ok =1; ARStructItemList *structItems = NULL; ARStatusList status; --- 2459,2463 ---- CODE: { ! int ret = 1, i = 0, a = 0, c = (items - 2) / 2, ok = 1; ARStructItemList *structItems = NULL; ARStatusList status; *************** *** 2403,2406 **** --- 2468,2472 ---- if ((items-3) % 2) { (void) ARError_add( AR_RETURN_ERROR, AP_ERR_BAD_ARGS); + ok = 0; } else { if (c > 0) { *************** *** 2447,2451 **** } } else { ! RETVAL = 1; } FreeARStructItemList(structItems, TRUE); --- 2513,2517 ---- } } else { ! RETVAL = 0; } FreeARStructItemList(structItems, TRUE); Index: Makefile.PL =================================================================== RCS file: /cvsroot/arsperl/ARSperl/Makefile.PL,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** Makefile.PL 15 May 2008 18:30:01 -0000 1.80 --- Makefile.PL 3 Nov 2008 17:08:19 -0000 1.81 *************** *** 26,30 **** # STEP 1 -> Set the path to your ARS API directory ! $ARSAPI = "/usr/ar/api"; #$ARSAPI = "/u1/project/ARSperl/api/sol2/api6.0.1"; #$ARSAPI = "/u1/project/ARSperl/api/sol2/api6.3"; --- 26,30 ---- # STEP 1 -> Set the path to your ARS API directory ! $ARSAPI = "/usr/ar/api"; #$ARSAPI = "/u1/project/ARSperl/api/sol2/api6.0.1"; #$ARSAPI = "/u1/project/ARSperl/api/sol2/api6.3"; *************** *** 56,60 **** # 4.52) # ! $ARSVERSION = 7.0; # STEP 3 -> Choose whether or not to enable encryption --- 56,60 ---- # 4.52) # ! $ARSVERSION = 7.1; # STEP 3 -> Choose whether or not to enable encryption Index: ARS.pm =================================================================== RCS file: /cvsroot/arsperl/ARSperl/ARS.pm,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** ARS.pm 15 May 2008 18:29:59 -0000 1.74 --- ARS.pm 3 Nov 2008 17:08:18 -0000 1.75 *************** *** 81,85 **** ars_ExpandCharMenu ars_GetField ars_simpleMenu ars_GetListActiveLink ars_SetEntry ! ars_perl_qualifier ars_Export ars_GetListFilter ars_GetListEscalation ars_GetListCharMenu ars_padEntryid ars_GetFilter ars_SetFilter --- 81,85 ---- ars_ExpandCharMenu ars_GetField ars_simpleMenu ars_GetListActiveLink ars_SetEntry ! ars_perl_qualifier ars_qualifier_ptr ars_Export ars_GetListFilter ars_GetListEscalation ars_GetListCharMenu ars_padEntryid ars_GetFilter ars_SetFilter |