dbAccess.c: Improve logging of illegal field_type

Debugging a problem and looking at the message

recGblDbaddrError: dbPut: Request type is 0 Illegal Database Request Type...
does not help very much: request type 0 is a legal value.

Improve the message to show the field type as well:
recGblDbaddrError: dbPut: dbrType = 0 field_type = DBF_INLIK (14)...

Do the same for both dbPut and dbGet.
This commit is contained in:
Torsten Bögershausen authored and Andrew Johnson committed 2026-05-27 09:52:14 -05:00
1 parent d1705d46f2
commit 87ee088728
1 file changed
+6 -2
+6 -2
View File
@@ -956,7 +956,9 @@ long dbGet(DBADDR *paddr, short dbrType,
if (INVALID_DB_REQ(dbrType) || field_type > DBF_DEVICE) {
char message[80];
sprintf(message, "dbGet: Request type is %d\n", dbrType);
sprintf(message, "dbGet: dbrType = %d, field_type = %.12s (%d).",
dbrType, dbGetFieldTypeString(field_type), field_type);
recGblDbaddrError(S_db_badDbrtype, paddr, message);
status = S_db_badDbrtype;
goto done;
@@ -1338,7 +1340,9 @@ long dbPut(DBADDR *paddr, short dbrType,
} else if (INVALID_DB_REQ(dbrType) || field_type > DBF_DEVICE) {
char message[80];
sprintf(message, "dbPut: Request type is %d", dbrType);
sprintf(message, "dbPut: dbrType = %d, field_type = %.12s (%d).",
dbrType, dbGetFieldTypeString(field_type), field_type);
recGblDbaddrError(S_db_badDbrtype, paddr, message);
return S_db_badDbrtype;
}