From 9e82a9670082b6f75c83d21c7354b1e16ced306f Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 10 Aug 2015 15:04:11 -0500 Subject: [PATCH] dbTest: Remove special ENUM handling from dbpf() This was preventing the value check in cvt_st_menu() from working. --- src/db/dbTest.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/db/dbTest.c b/src/db/dbTest.c index 2c9350d6f..b827465bb 100644 --- a/src/db/dbTest.c +++ b/src/db/dbTest.c @@ -336,7 +336,6 @@ long epicsShareAPI dbpf(const char *pname,const char *pvalue) { DBADDR addr; long status; - epicsUInt16 value; short dbrType; long n = 1; @@ -348,16 +347,7 @@ long epicsShareAPI dbpf(const char *pname,const char *pvalue) if (nameToAddr(pname, &addr)) return -1; - /* For enumerated types must allow for ENUM rather than string */ - /* If entire field is digits then use DBR_ENUM else DBR_STRING */ - if (addr.dbr_field_type == DBR_ENUM && *pvalue && - strspn(pvalue,"0123456789") == strlen(pvalue)) { - - sscanf(pvalue, "%hu", &value); - pvalue = (char *) &value; - dbrType = DBR_ENUM; - } - else if (addr.no_elements > 1 && + if (addr.no_elements > 1 && (addr.dbr_field_type == DBR_CHAR || addr.dbr_field_type == DBR_UCHAR)) { dbrType = addr.dbr_field_type; n = strlen(pvalue) + 1;