Revert "new error code for empty arrays"
This reverts commit d51b5513fda5ca7c6058990396d315cfff81cbfe. Conflicts: modules/database/src/ioc/db/dbAccess.c modules/database/src/ioc/db/dbDbLink.c
This commit is contained in:
@@ -958,7 +958,7 @@ long dbGet(DBADDR *paddr, short dbrType,
|
||||
DBADDR localAddr = *paddr; /* Structure copy */
|
||||
|
||||
if (no_elements < 1) {
|
||||
status = S_db_emptyArray;
|
||||
status = S_db_badField;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
@@ -205,7 +205,6 @@ struct dbr_alDouble {DBRalDouble};
|
||||
#define S_db_noMemory (M_dbAccess|66) /*unable to allocate data structure from pool*/
|
||||
#define S_db_notInit (M_dbAccess|67) /*Not initialized*/
|
||||
#define S_db_bufFull (M_dbAccess|68) /*Buffer full*/
|
||||
#define S_db_emptyArray (M_dbAccess|69) /*Array has no elements*/
|
||||
|
||||
struct dbEntry;
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ static long dbDbGetValue(struct link *plink, short dbrType, void *pbuffer,
|
||||
return status;
|
||||
|
||||
if (pnRequest && *pnRequest <= 0)
|
||||
return S_db_emptyArray;
|
||||
return S_db_badField;
|
||||
}
|
||||
|
||||
if (!status && precord != dbChannelRecord(chan))
|
||||
|
||||
@@ -46,9 +46,9 @@ static void expectProcSuccess(const char *rec)
|
||||
static void expectProcFailure(const char *rec)
|
||||
{
|
||||
char fieldname[20];
|
||||
testDiag("expecting failure S_db_emptyArray %#x from %s", S_db_emptyArray, rec);
|
||||
testDiag("expecting failure S_db_badField %#x from %s", S_db_badField, rec);
|
||||
sprintf(fieldname, "%s.PROC", rec);
|
||||
testdbPutFieldFail(S_db_emptyArray, fieldname, DBF_LONG, 1);
|
||||
testdbPutFieldFail(S_db_badField, fieldname, DBF_LONG, 1);
|
||||
sprintf(fieldname, "%s.SEVR", rec);
|
||||
testdbGetFieldEqual(fieldname, DBF_LONG, INVALID_ALARM);
|
||||
sprintf(fieldname, "%s.STAT", rec);
|
||||
|
||||
Reference in New Issue
Block a user