dbTest: Remove special ENUM handling from dbpf()
This was preventing the value check in cvt_st_menu() from working.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user