[Arsperl-devel] ARSperl ARS.pm, 1.72, 1.73 ARS.xs, 1.117, 1.118 MANIFEST, 1.32, 1.33 Makefile.PL, 1
Brought to you by:
jeffmurphy
Update of /cvsroot/arsperl/ARSperl In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv24285 Modified Files: ARS.pm ARS.xs MANIFEST Makefile.PL changes.dat rev_AR_template.pl support.c supportrev.c supportrev_generated.c Log Message: arsystem 7.1 port Index: rev_AR_template.pl =================================================================== RCS file: /cvsroot/arsperl/ARSperl/rev_AR_template.pl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rev_AR_template.pl 21 Apr 2007 22:22:06 -0000 1.3 --- rev_AR_template.pl 13 Sep 2007 22:50:25 -0000 1.4 *************** *** 78,81 **** --- 78,89 ---- + /* #if defined(malloc) && defined(_WIN32) + #undef malloc + #undef calloc + #undef realloc + #undef free + #endif */ + + @> foreach my $class ( @classes_C ){ @> my $obj = $CONVERT{$class}; Index: changes.dat =================================================================== RCS file: /cvsroot/arsperl/ARSperl/changes.dat,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** changes.dat 11 Aug 2007 20:24:39 -0000 1.56 --- changes.dat 13 Sep 2007 22:50:25 -0000 1.57 *************** *** 1,9 **** MB removed legacy ars_NT Notifier and ars_AdminExtension calls !MB added ars_VerifyUser implementation by Thilo Stapff !MB changed ars_APIVersion to use AR_CURRENT_API_VERSION rather than AR_EXPORT_VERSION ! MB fixed ars_GetActiveLink, ars_GetFilter, ars_GetEscalation, ars_GetField so they ! return undef on failure. ! ! released=xx/xx/xxx version=1.91 JCM buffer overflow in perl_BuildEntryList JCM malloc-on-windows patch by John Unsworth --- 1,13 ---- + released=xx/xx/xxx version=1.91 + TS fixed ars_padEntryid to work correctly if entry ID prefix is defined + TS malloc-on-windows patch commented out because of crash with API 6.3.0 + TS fixed pointer initialization error in ars_SetVUI + TS modified ars_Create/Get/SetFilter for API 7.1 + TS fixed ars_GetAlertCount MB removed legacy ars_NT Notifier and ars_AdminExtension calls !MB added ars_VerifyUser implementation by Thilo Stapff !MB changed ars_APIVersion to use AR_CURRENT_API_VERSION rather than AR_EXPORT_VERSION ! MB fixed ars_GetActiveLink, ars_GetFilter, ars_GetEscalation, ars_GetField so they ! return undef on failure. JCM buffer overflow in perl_BuildEntryList JCM malloc-on-windows patch by John Unsworth Index: ARS.xs =================================================================== RCS file: /cvsroot/arsperl/ARSperl/ARS.xs,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -d -r1.117 -r1.118 *** ARS.xs 11 Aug 2007 20:22:00 -0000 1.117 --- ARS.xs 13 Sep 2007 22:50:25 -0000 1.118 *************** *** 32,35 **** --- 32,44 ---- #endif + + /* #if defined(malloc) && defined(_WIN32) + #undef malloc + #undef calloc + #undef realloc + #undef free + #endif */ + + MODULE = ARS PACKAGE = ARS PREFIX = ARS *************** *** 351,385 **** HV* ars_VerifyUser(ctrl) ! ARControlStruct * ctrl ! CODE: ! { ! int ret = 0; ! ARBoolean adminFlag = 0, ! subAdminFlag = 0, ! customFlag = 0; ! ARStatusList status; ! (void) ARError_reset(); ! Zero(&status, 1, ARStatusList); ! ret = ARVerifyUser( ctrl, &adminFlag, &subAdminFlag, &customFlag, ! &status ); ! if(! ARError(ret, status)) { ! RETVAL = newHV(); ! sv_2mortal( (SV*) RETVAL ); ! hv_store( RETVAL, "adminFlag", strlen("adminFlag"), ! newSViv(adminFlag), 0); ! hv_store( RETVAL, "subAdminFlag", strlen("subAdminFlag"), ! newSViv(subAdminFlag), 0); ! hv_store( RETVAL, "customFlag", strlen("customFlag"), ! newSViv(customFlag), 0); ! }else{ ! XSRETURN_UNDEF; ! } ! } ! OUTPUT: ! RETVAL void --- 360,393 ---- HV* ars_VerifyUser(ctrl) ! ARControlStruct * ctrl ! CODE: ! { ! int ret = 0; ! ARBoolean adminFlag = 0, ! subAdminFlag = 0, ! customFlag = 0; ! ARStatusList status; ! (void) ARError_reset(); ! Zero(&status, 1, ARStatusList); ! ret = ARVerifyUser( ctrl, &adminFlag, &subAdminFlag, &customFlag, &status ); ! /* printf( "ret = %d, adminFlag = %d, subAdminFlag = %d, customFlag = %d\n", ! ret, adminFlag, subAdminFlag, customFlag ); */ ! if(! ARError(ret, status)) { ! RETVAL = newHV(); ! sv_2mortal( (SV*) RETVAL ); ! ! hv_store( RETVAL, "adminFlag", strlen("adminFlag"), newSViv(adminFlag), 0); ! hv_store( RETVAL, "subAdminFlag", strlen("subAdminFlag"), newSViv(subAdminFlag), 0); ! hv_store( RETVAL, "customFlag", strlen("customFlag"), newSViv(customFlag), 0); ! }else{ ! XSRETURN_UNDEF; ! } ! } ! OUTPUT: ! RETVAL void *************** *** 1475,1478 **** --- 1483,1490 ---- ARWorkflowConnectStruct schemaList; ARPropList objPropList; + #if AR_CURRENT_API_VERSION >= 13 + unsigned int errorFilterOptions; + ARNameType errorFilterName; + #endif AMALLOCNN(query,1,ARQualifierStruct); *************** *** 1486,1489 **** --- 1498,1504 ---- Zero(&diaryList, 1, ARDiaryList); Zero(&status, 1,ARStatusList); + #if AR_CURRENT_API_VERSION >= 13 + Zero(&errorFilterName, 1,ARNameType); + #endif ret = ARGetFilter(ctrl, name, &order, &schemaList, *************** *** 1492,1495 **** --- 1507,1514 ---- ×tamp, owner, lastChanged, &changeDiary, &objPropList, + #if AR_CURRENT_API_VERSION >= 13 + &errorFilterOptions, + errorFilterName, + #endif &status); #ifdef PROFILE *************** *** 1536,1539 **** --- 1555,1562 ---- } } + #if AR_CURRENT_API_VERSION >= 13 + hv_store(RETVAL, "errorFilterOptions", strlen("errorFilterOptions") , newSViv(errorFilterOptions), 0); + hv_store(RETVAL, "errorFilterName", strlen("errorFilterName") , newSVpv(errorFilterName, 0), 0); + #endif FreeARFilterActionList(&actionList,FALSE); FreeARFilterActionList(&elseList,FALSE); *************** *** 2104,2108 **** --- 2127,2135 ---- Zero(lastChanged, 1, ARAccessNameType); Zero(&diaryList, 1, ARDiaryList); + #if AR_EXPORT_VERSION >= 9 ret = ARGetFieldCached(ctrl, schema, id, fieldName, &fieldMap, &dataType, &option, &createMode, &fieldOption, &defaultVal, NULL /* &permissions */, &limit, &displayList, &helpText, ×tamp, owner, lastChanged, &changeDiary, &Status); + #else + ret = ARGetFieldCached(ctrl, schema, id, fieldName, &fieldMap, &dataType, &option, &createMode, &defaultVal, NULL /* &permissions */, &limit, &displayList, &helpText, ×tamp, owner, lastChanged, &changeDiary, &Status); + #endif #ifdef PROFILE ((ars_ctrl *)ctrl)->queries++; *************** *** 2162,2166 **** --- 2189,2197 ---- AP_FREE(changeDiary); } + #if AR_EXPORT_VERSION >= 9L ret = ARGetField(ctrl, schema, id, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &permissions, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &Status); + #else + ret = ARGetField(ctrl, schema, id, NULL, NULL, NULL, NULL, NULL, NULL, &permissions, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &Status); + #endif #ifdef PROFILE ((ars_ctrl *)ctrl)->queries++; *************** *** 4638,4642 **** int ret = 0, rv = 0; ARNameType vuiName; ! char *vuiNamePtr; ARLocaleType locale; char *localePtr = NULL; --- 4669,4673 ---- int ret = 0, rv = 0; ARNameType vuiName; ! char *vuiNamePtr = NULL; ARLocaleType locale; char *localePtr = NULL; *************** *** 5455,5458 **** --- 5486,5493 ---- ARWorkflowConnectStruct schemaList; ARPropList objPropList; + #if AR_CURRENT_API_VERSION >= 13 + unsigned int errorFilterOptions = 0; + ARNameType errorFilterName; + #endif RETVAL = 0; /* assume error */ *************** *** 5467,5470 **** --- 5502,5508 ---- Zero(&schemaList, 1, ARWorkflowConnectStruct); Zero(&schemaNameList, 1, ARNameList); + #if AR_CURRENT_API_VERSION >= 13 + Zero(errorFilterName, 1, ARNameType); + #endif schemaList.type = AR_WORKFLOW_CONN_SCHEMA_LIST; schemaList.u.schemaList = &schemaNameList; *************** *** 5523,5526 **** --- 5561,5571 ---- rv += rev_ARPropList(ctrl, objDef, "objPropList", &objPropList); + #if AR_CURRENT_API_VERSION >= 13 + if( hv_exists(objDef, "errorFilterOptions", strlen("errorFilterOptions")) ) + rv += uintcpyHVal( objDef, "errorFilterOptions", &errorFilterOptions ); + + if( hv_exists(objDef, "errorFilterName", strlen("errorFilterName")) ) + rv += strcpyHVal( objDef, "errorFilterName", errorFilterName, sizeof(ARNameType) ); + #endif /* at this point all datastructures (hopefully) are *************** *** 5534,5538 **** &actionList, &elseList, helpText, owner, changeDiary, ! &objPropList, &status); if(!ARError( ret, status)) RETVAL = 1; --- 5579,5588 ---- &actionList, &elseList, helpText, owner, changeDiary, ! &objPropList, ! #if AR_CURRENT_API_VERSION >= 13 ! errorFilterOptions, ! errorFilterName, ! #endif ! &status); if(!ARError( ret, status)) RETVAL = 1; *************** *** 5585,5588 **** --- 5635,5643 ---- ARWorkflowConnectStruct *schemaList = NULL; ARPropList *objPropList = NULL; + #if AR_CURRENT_API_VERSION >= 13 + unsigned int *errorFilterOptions = NULL; + ARNameType errorFilterName; + char *errorFilterNamePtr = NULL; + #endif RETVAL = 0; /* assume error */ *************** *** 5591,5594 **** --- 5646,5652 ---- Zero(newName, 1, ARNameType); Zero(owner, 1, ARAccessNameType); + #if AR_CURRENT_API_VERSION >= 13 + Zero(errorFilterName, 1, ARNameType); + #endif if(SvTYPE((SV *)SvRV(objDefRef)) != SVt_PVHV) { *************** *** 5665,5668 **** --- 5723,5737 ---- rv += rev_ARFilterActionList(ctrl, objDef, "elseList", elseList); } + #if AR_CURRENT_API_VERSION >= 13 + if( hv_exists(objDef,"errorFilterOptions",18) ){ + errorFilterOptions = (unsigned int*) MALLOCNN(sizeof(unsigned int)); + rv += uintcpyHVal( objDef, "errorFilterOptions", errorFilterOptions); + } + + if(hv_exists(objDef, "errorFilterName", strlen("errorFilterName") )){ + rv += strcpyHVal( objDef, "errorFilterName", errorFilterName, sizeof(ARNameType)); + errorFilterNamePtr = errorFilterName; + } + #endif /* at this point all datastructures (hopefully) are *************** *** 5675,5679 **** actionList, elseList, helpText, ownerPtr, changeDiary, ! objPropList, &status); if(!ARError( ret, status)) RETVAL = 1; --- 5744,5753 ---- actionList, elseList, helpText, ownerPtr, changeDiary, ! objPropList, ! #if AR_CURRENT_API_VERSION >= 13 ! errorFilterOptions, ! errorFilterNamePtr, ! #endif ! &status); if(!ARError( ret, status)) RETVAL = 1; *************** *** 6367,6371 **** unsigned long whereToWriteMask = AR_WRITE_TO_STATUS_LIST; int ret; ! FILE *logFilePtr; (void) ARError_reset(); --- 6441,6445 ---- unsigned long whereToWriteMask = AR_WRITE_TO_STATUS_LIST; int ret; ! FILE *logFilePtr = NULL; (void) ARError_reset(); *************** *** 6648,6652 **** SV * ! ars_GetAlertCount(ctrl,qualifier) ARControlStruct * ctrl ARQualifierStruct * qualifier --- 6722,6726 ---- SV * ! ars_GetAlertCount(ctrl,qualifier=NULL) ARControlStruct * ctrl ARQualifierStruct * qualifier *************** *** 6664,6668 **** &status); if( !ARError(ret, status) ) { ! RETVAL=sv_2mortal(newSViv(count)); } #else --- 6738,6743 ---- &status); if( !ARError(ret, status) ) { ! /* RETVAL=sv_2mortal(newSViv(count)); */ ! RETVAL = newSViv(count); } #else Index: Makefile.PL =================================================================== RCS file: /cvsroot/arsperl/ARSperl/Makefile.PL,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** Makefile.PL 20 Jul 2007 19:44:34 -0000 1.78 --- Makefile.PL 13 Sep 2007 22:50:25 -0000 1.79 *************** *** 31,35 **** #$ARSAPI = "/u1/project/ARSperl/api/linux/4.0"; #$ARSAPI = "/u1/project/ARSperl/api/sol2/api6.3"; ! $ARSAPI = "/u1/project/ARSperl/api/linux/7.0.1p1"; #$ARSAPI = "/u1/project/ARSperl/api/sol2/api5.1.1"; # $ARSAPI = "/home/jcmurphy/arsperl/api/5.1"; --- 31,35 ---- #$ARSAPI = "/u1/project/ARSperl/api/linux/4.0"; #$ARSAPI = "/u1/project/ARSperl/api/sol2/api6.3"; ! #$ARSAPI = "/u1/project/ARSperl/api/linux/7.0.1p1"; #$ARSAPI = "/u1/project/ARSperl/api/sol2/api5.1.1"; # $ARSAPI = "/home/jcmurphy/arsperl/api/5.1"; *************** *** 50,54 **** # STEP 2 -> Choose your version of ARS FROM THE FOLLOWING LIST # ! # 2.0 2.1 3.0 3.1 3.2 4.0 4.52 5.0 6.0 6.01 6.3 7.0 # # notes --- 50,54 ---- # STEP 2 -> Choose your version of ARS FROM THE FOLLOWING LIST # ! # 2.0 2.1 3.0 3.1 3.2 4.0 4.52 5.0 6.0 6.01 6.3 7.0 7.1 # # notes *************** *** 61,65 **** # 4.52) # ! $ARSVERSION = 7.0; # STEP 3 -> Choose whether or not to enable encryption --- 61,65 ---- # 4.52) # ! $ARSVERSION = 7.1; # STEP 3 -> Choose whether or not to enable encryption Index: support.c =================================================================== RCS file: /cvsroot/arsperl/ARSperl/support.c,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** support.c 20 Jul 2007 19:44:34 -0000 1.64 --- support.c 13 Sep 2007 22:50:25 -0000 1.65 *************** *** 36,39 **** --- 36,48 ---- #include "supportrev.h" + + /* #if defined(malloc) && defined(_WIN32) + #undef malloc + #undef calloc + #undef realloc + #undef free + #endif */ + + int compmem(MEMCAST * m1, MEMCAST * m2, int size) *************** *** 69,75 **** mallocnn(int s) { ! #if defined(malloc) && defined(_WIN32) #undef malloc ! #endif void *m = malloc(s ? s : 1); --- 78,84 ---- mallocnn(int s) { ! /* #if defined(malloc) && defined(_WIN32) #undef malloc ! #endif */ void *m = malloc(s ? s : 1); Index: MANIFEST =================================================================== RCS file: /cvsroot/arsperl/ARSperl/MANIFEST,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** MANIFEST 20 Jul 2007 19:44:34 -0000 1.32 --- MANIFEST 13 Sep 2007 22:50:25 -0000 1.33 *************** *** 72,81 **** html/manual/ars_APIVersion.html html/manual/ars_CreateActiveLink.html - html/manual/ars_CreateAdminExtension.html html/manual/ars_CreateAlertEvent.html html/manual/ars_CreateEntry.html html/manual/ars_DecodeAlertMessage.html html/manual/ars_DeleteActiveLink.html - html/manual/ars_DeleteAdminExtension.html html/manual/ars_DeleteCharMenu.html html/manual/ars_DeleteContainer.html --- 72,79 ---- *************** *** 89,97 **** html/manual/ars_DeregisterForAlerts.html html/manual/ars_EncodeDiary.html - html/manual/ars_ExecuteAdminExtension.html html/manual/ars_ExecuteProcess.html html/manual/ars_Export.html html/manual/ars_GetActiveLink.html - html/manual/ars_GetAdminExtension.html html/manual/ars_GetAlertCount.html html/manual/ars_GetCharMenu.html --- 87,93 ---- *************** *** 109,113 **** html/manual/ars_GetFullTextInfo.html html/manual/ars_GetListActiveLink.html - html/manual/ars_GetListAdminExtension.html html/manual/ars_GetListAlertUser.html html/manual/ars_GetListCharMenu.html --- 105,108 ---- *************** *** 135,154 **** html/manual/ars_Logoff.html html/manual/ars_MergeEntry.html - html/manual/ars_NTCheckRegisteredClient.html - html/manual/ars_NTDeregisterClient.html - html/manual/ars_NTDeregisterServer.html - html/manual/ars_NTGetListServer.html - html/manual/ars_NTInitializationClient.html - html/manual/ars_NTInitializationServer.html - html/manual/ars_NTNotificationClient.html - html/manual/ars_NTNotificationServer.html - html/manual/ars_NTRegisterClient.html - html/manual/ars_NTRegisterServer.html - html/manual/ars_NTTerminationClient.html - html/manual/ars_NTTerminationServer.html html/manual/ars_RegisterForAlerts.html html/manual/ars_SetEntry.html html/manual/ars_SetLogging.html html/manual/ars_SetServerInfo.html html/manual/ars_decodeStatusHistory.html html/manual/ars_encodeStatusHistory.html --- 130,138 ---- html/manual/ars_Logoff.html html/manual/ars_MergeEntry.html html/manual/ars_RegisterForAlerts.html html/manual/ars_SetEntry.html html/manual/ars_SetLogging.html html/manual/ars_SetServerInfo.html + html/manual/ars_VerifyUser.html html/manual/ars_decodeStatusHistory.html html/manual/ars_encodeStatusHistory.html *************** *** 184,188 **** html/manual/ds_fls.html html/manual/ds_fncas.html - html/manual/ds_getadminext_hash.html html/manual/ds_getcharmenu_hash.html html/manual/ds_getescalation_hash.html --- 168,171 ---- *************** *** 206,209 **** --- 189,193 ---- html/manual/ds_shv.html html/manual/ds_statstruct_hash.html + html/manual/ds_verifyuser_hash.html html/manual/ds_vs.html html/manual/loading.html Index: supportrev_generated.c =================================================================== RCS file: /cvsroot/arsperl/ARSperl/supportrev_generated.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** supportrev_generated.c 21 Apr 2007 22:22:06 -0000 1.3 --- supportrev_generated.c 13 Sep 2007 22:50:25 -0000 1.4 *************** *** 8,11 **** --- 8,19 ---- + /* #if defined(malloc) && defined(_WIN32) + #undef malloc + #undef calloc + #undef realloc + #undef free + #endif */ + + Index: supportrev.c =================================================================== RCS file: /cvsroot/arsperl/ARSperl/supportrev.c,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** supportrev.c 21 Apr 2007 22:22:06 -0000 1.29 --- supportrev.c 13 Sep 2007 22:50:25 -0000 1.30 *************** *** 41,44 **** --- 41,53 ---- #include "supportrev_generated.h" + + /* #if defined(malloc) && defined(_WIN32) + #undef malloc + #undef calloc + #undef realloc + #undef free + #endif */ + + /* * forward declarations Index: ARS.pm =================================================================== RCS file: /cvsroot/arsperl/ARSperl/ARS.pm,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** ARS.pm 11 Aug 2007 20:22:00 -0000 1.72 --- ARS.pm 13 Sep 2007 22:50:25 -0000 1.73 *************** *** 265,277 **** sub ars_padEntryid { ! my($c) = shift; ! my($schema) = shift; ! my($entry_id) = shift; ! my($field); ! # entry id field is field id #1 ! ($field = ars_GetField($c, $schema, 1)) || return undef; ! return ("0"x($field->{limit}{maxLength}-length($entry_id))).$entry_id; } --- 265,281 ---- sub ars_padEntryid { ! my($c) = shift; ! my($schema) = shift; ! my($entry_id) = shift; ! my($field); ! # entry id field is field id #1 ! ($field = ars_GetField($c, $schema, 1)) || return undef; ! if( $field->{defaultVal} ){ ! return $field->{defaultVal}.("0"x($field->{limit}{maxLength}-length($field->{defaultVal})-length($entry_id))).$entry_id; ! }else{ ! return ("0"x($field->{limit}{maxLength}-length($entry_id))).$entry_id; ! } } |