diff --git a/src/db/dbTest.c b/src/db/dbTest.c index 7be37b887..a6ab812c0 100644 --- a/src/db/dbTest.c +++ b/src/db/dbTest.c @@ -71,6 +71,7 @@ #include #include +#include #include #include #include @@ -193,6 +194,7 @@ long dbpr(pname) /* print record */ printf("No record Support for this record type\n"); return(1); } +#if 0 if(!(report = (prset->report))) { printf("No report routine in RSET\n"); return(1); @@ -201,6 +203,7 @@ long dbpr(pname) /* print record */ fflush(stdout); if(!RTN_SUCCESS(status)) recGblRecSupError(S_db_noSupport,&addr,"dbpr","report"); +#endif return(0); } @@ -212,24 +215,26 @@ long dbtr(pname) /* test record and print*/ long options,no_elements; struct rset *prset; long int (*process)()=NULL; + struct dbCommon *precord; status=dbNameToAddr(pname,&addr); if(status) { printf("dbNameToAddr failed\n"); return(1); } - if(!(prset=GET_PRSET(addr.record_type))) { - printf("No record Support for this record type\n"); - return(1); + precord=(struct dbCommon*)(addr.precord); + if (precord->pact) { + printf("record active\n"); + return(1); } - if(!(process = (prset->process))) { - printf("No process routine in RSET\n"); - return(1); + if(FASTLOCKTEST(&precord->mlok)) { + printf("record locked\n"); + return(1); } - status=(*process)(addr.precord); + status=dbProcess(&addr); if(!RTN_SUCCESS(status)) recGblRecSupError(S_db_noSupport,&addr,"dbtr","process"); - dbpr(pname); + dbpr(pname,0); return(0); }