When dataType==DBR_STRING && count==1, libca may optimize
by sending less than 40 bytes.
Re-arrange write_notify_action() so that this case can
copy directly into the put notify buffer.
Factor out write_notify_cancel() to make clear that the
current message header / pBuffer are not used.
Also, call out magic 60 second timeout.
When dataType==DBR_STRING && count==1, libca may optimize
by sending less than 40 bytes.
Add a special scratch buffer for this case so that downstream
code can continue to assume MAX_STRING_SIZE.
Bounds check m_count / element count against dbChannel.
For write_notify_action only.
Bounds check DBR data size against received payload buffer length
For write_action, add pre-test with dbr_size_n() before caNetConvert()
In this context "CID" means Channel ID,
in this case meaning the server assigned identifier.
While in other contexts this is called SID (Server ID),
to distinguish from the Client ID (also CID :( )
A short message could underflow, leaving a too old client stuck
in a tar pit. An acceptable outcome, but not intended.
Instead, send back errors to each message.
The DBF_UINT64 case dereferenced the 8-byte field as *(epicsUInt32 *),
reading only its low 32 bits, so large UINT64 values printed wrong
(e.g. 0x1_0000_0000 as "0") and save/restore round-tripping broke. Cast
to epicsUInt64*, matching the adjacent DBF_INT64 case.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The beacon-period gate in online_notify already rejected a parse
failure and a non-positive value, but epicsScanDouble parses "nan" and
"inf", and maxPeriod<=0.0 is false for both, so a non-finite period
reached the beacon delay loop. A NaN maxdelay makes delay<maxdelay
false forever, pinning the beacon interval at the 0.02 s startup value
- a ~50 Hz beacon flood on every configured interface; an infinite
maxdelay lets the doubling delay grow without bound, silencing beacons
entirely.
Gate on finite() (from epicsMath.h), matching the client-side
EPICS_CA_MAX_SEARCH_PERIOD handling in udpiiu.cpp, and name the actual
problem in the diagnostic instead of "float fetch failed" (the message
already covered the non-positive case, which is not a fetch failure).
putUInt64String used cvtUlongToString, which is cvtUInt32ToString, so the
64-bit source was narrowed to its low 32 bits (e.g. 0x1_0000_0007 printed
as "7"). Use cvtUInt64ToString, matching getUInt64String and every other
width-specific putXxxString.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The guard used recname[0] = '\0' (assignment) instead of == , which wrote
a NUL into the caller's string, truncating it to "", and evaluated to 0
so recname was left non-NULL pointing at "". Every record then failed
the name comparison and nothing was mapped. Use ==, matching dbjlr.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Add GDB helper script
Pretty printing of some common argument types
Need to add a line to ~/.gdbinit
> add-auto-load-safe-path /path/to/base/checkout/
afterwards verify at GDB shell with
> info auto-load python-scripts
> info pretty-printer
Tested with GDB 16.3 circa Debian 13
Add $rcast(dbCommon) to up-cast
Add $record("name") to lookup record
Add $elln(ELLLIST,#) to index into list
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.
After connectCallback, need to wait for up to three
concurrent actions. Native and string subscriptions,
as well as GET of metadata.
Complicated because event_handler_args does not identify
the evid.
see 717d69e1fc
* skeleton for implementation of dbCreateRecord iocsh exposure
* Add functionality of dbCreateRecordCallFunc
Includes adding dependancy to iocInit.h and a new error type in dbStaticLib.h
* Fix error message for case when adding record to IOC post init
* add new error message for when no record name is passed and check for empty strings
* add release note for dbCreateRecord IOC shell command
* fix issues from codeql in release notes
* fix documentation md based on codacy styling
eg. After running "false > $@", the output file modification
time will be updated. So a despite failure, a repeated
"make" will not re-run.
Handle this by accumulating output to "$@.tmp", then
move to $@ as a final step.