Commit Graph

1037 Commits

Author SHA1 Message Date
Andrew Johnson
ae3d3904d9 Fix minor locking issue in dbEvent.c 2015-07-17 18:09:14 -05:00
Andrew Johnson
c0e2a44365 Register dbPutAttribute with iocsh 2015-06-23 17:04:37 -05:00
Andrew Johnson
84c3ec7c64 db: Correct DBF_CHAR range in recGbl.c
Seems invisible, but spotted by Lawrence T. Prevatte III.
2015-06-23 15:51:00 -05:00
Andrew Johnson
65e781d58a db: Fix off-by-one error in initHookName()
Thanks to Lawrence T. Prevatte III for noticing that.
2015-06-23 14:46:29 -05:00
Michael Davidsaver
b082e7d1e8 dbContextReadNotify: Improper handling of array size changes
Issue diagnosed and reported by Ambroz Bizjak.

The dbContextReadNotifyCacheAllocator allocator clears
its cache of free buffers on an array size change.
But doesn't consider buffer already in use, which
will later be free'd.  Such buffers were being
returned to the cache, then reused in allocations
for which they are too short.

Track the size of buffers which are in use.
Only return buffers with the present length
to the cache.  Others are free'd immediately.
2015-04-09 14:39:24 -04:00
Andrew Johnson
4a0880003c Support MinGW cross-builds on linux-x86 and x86_64 2015-02-24 14:30:42 -06:00
Michael Davidsaver
c0cf25eeee dbCa: dbCaPutLinkCallback initialize entire array
CA links will write the full target array size.
Ensure that uninitialized elements are zeroed.
2015-02-19 19:18:27 -05:00
Michael Davidsaver
3501fda48d dbCa: dbCaPutLinkCallback prevent out of bounds write
The internal buffer of the caLink is sized based on the
number of elements of the destination PV.
2015-02-19 19:18:16 -05:00
Andrew Johnson
9813fa6474 db: Allow link fields to return a DOUBLE value
A dbCa link does a ca_get with type DBR_CTRL_DOUBLE
to populate its list of attribute values immediately
after connecting. If the target is a DBF_*LINK field
it used to return an error, preventing the link from
properly connecting. This change makes dbGetField()
return a single NAN value instead of rejecting the
request.

Fixes: lp:545358
2015-02-19 15:55:48 -06:00
Andrew Johnson
7e36a58f1e Back-ported dbLoadRecordsHook from the 3.15 branch 2015-02-17 14:29:20 -06:00
Andrew Johnson
4b44881744 db: Fixed bogus dbScan overrun warnings
Penalizing the 0.1 second scan thread by 0.1 seconds
guarantees another overrun in most cases...
Warning message improved.

Also added a release note for Jeff's CAS commit.
2013-10-17 17:21:26 -05:00
Andrew Johnson
2d3a828acd Fixed read-back of TSEL link
Reading back a .TSEL field that was originally pointed to
another record's .TIME field was exposing internal details
that didn't need to be made visible. This commit hides the
.TIME => .VAL change completely, and allows a .TSEL link
field to be saved and restored properly using autosave.
2013-09-13 11:57:18 -05:00
Andrew Johnson
01f0fdbf1e More file permission fixes. 2013-08-19 15:46:51 -05:00
Andrew Johnson
ffa96d36e1 db: dbpf can now put strings to UCHAR arrays
Also improved the dbpf error message on value conversion failures.
Source code reformatting inside dbTest.c as well.
2013-08-01 18:10:18 -05:00
Jeff Hill johill@lanl.gov
e0bc071de3 merged in fix for https://bugs.launchpad.net/epics-base/+bug/1179642
also merged in removal of c++ support for old HPUX compiler
2013-05-16 12:33:31 -06:00
Andrew Johnson
038a1140f4 Fix drift in periodic scan times.
Method from Eric Norum, with warnings added by me.

Fixes lp:597054
2013-01-09 18:12:30 -06:00
Andrew Johnson
e889336458 db: Undefined alarm limits should return NaN
Where the record doesn't provide get_alarm_double() or for fields
where the default applies, we were still returning 0.
2012-10-17 18:08:39 -05:00
Michael Davidsaver
7cac267a4b db: Fix possible error handling in dbPut 2012-10-11 18:10:00 -05:00
Andrew Johnson
4982a6308b db: Don't call epicsPrintf() from callbackRequest()
The callbackRequest() routine can be called from an ISR,
so use epicsInterruptContextMessage() to print errors.
2012-05-04 17:34:48 -05:00
Andrew Johnson
243baddbf6 Add an Init stat to all thread control variables
This makes the uninitilized value not the Run state.
2012-05-04 13:38:59 -05:00
Andrew Johnson
dffe203856 db: Another modification to fix lp:907761
From Dirk Zimoch.
2012-03-19 12:31:11 -05:00
Andrew Johnson
7435a9831b db: Reject trailing space in numeric => enum/menu/device conversion
This is really a workaround for a Win32/MinGW bug in sscanf, which
will only set the %n argument for the format "%u %n" when there is
a space following the unsigned number.

This changes the IOC's behavior very slightly.
2012-03-06 14:14:39 -06:00
Andrew Johnson
f86cf730e9 db: fix dbpf to enum from integer bug 2012-01-27 09:41:37 -06:00
Andrew Johnson
7cc8a552a3 db: Allow single-char accesses as long strings
Clients try to use long string support to fetch DBF_STRING
fields use DBF_CTRL_CHAR with a 1-element array, but the IOC
was rejecting that.  This permits it, and also ensures that
the resulting strings are zero-terminated.

Fixes lp:907761
2012-01-11 16:47:37 -06:00
Jeff Hill johill@lanl.gov
96cad82a2a o fixed launchpad epics base bug 878372
o fixed launchpad epics base bug 878387
o added regression test for bug 878372
o build the optional test and diagnostic codes  for all (not just vxWorks) IOCs
o added acctstRegister optional IOC shell registration for regression tests
2011-10-19 12:07:00 -06:00
unknown
5649e15842 ca: Remove unnecessary mutable qualifiers
These references are never actually "mutated", and break builds
with a recent C++ compiler.

Fixes lp:736273
2011-06-01 17:22:12 -05:00
Andrew Johnson
2bb3074fab db: Fix db_get_field() on an empty array field.
This fixes a bug introduced with the dynamic-array branch.
The new version of db_get_field() was using the dbr_size_n() macro to
calculate the offset to the start of the buffer area to be zeroed, but
when nRequest is zero this gives the wrong result; the dbr_ structures
always contain at least one value element, and dbr_size_n() thus has
to include that in its size calculation.
2010-10-27 13:26:56 -05:00
Andrew Johnson
fbda9f3280 RCS keyword updates for Bazaar
Replaced $Id$ and $Header$ keywords with $Revision-Id$
Deleted $Log$ keywords and any log messages
2010-10-05 14:27:37 -05:00
Andrew Johnson
d4814f1395 db/test: On vxWorks make a callbackTest.munch that works. 2010-09-29 16:00:46 -05:00
Janet Anderson
3489c93e32 Added missing epicsShareAPI for db_get_field_and_count. 2010-09-27 11:41:53 -05:00
Michael Abbott
e87bbef75c Update rsrv to support V4.13 protocol extension.
The rsrv server is updated in this commit to deliver variable sized
waveforms in response to a zero length request, implementing an
extension to the v4 EPICS protocol tied to minor version 13.

The core of the changes are in read_reply, rsrv/camessage.c, which first
reserves packet space for the largest possible response, but then resizes
the packet according to how much data is actually returned from the
database.
2010-08-11 16:38:49 -05:00
Andrew Johnson
cc95161af0 Merged base-tests branch from epics-base-testing team.
Modified testspec output to omit Tests: line when empty
Added testspec generation to src/db/test/Makefile.
2010-08-04 14:16:14 -05:00
unknown
1660dcac9c Removed trailing ';' from dbGetSevr macro definition. 2010-07-19 09:49:01 -05:00
Ralph Lange
60be4921c8 Fix: Replaced C++ reserved word 'new' as variable name. 2010-06-16 15:58:00 -04:00
Kukhee Kim
fa564fbfdf BUG 572589: Make dbl emit empty strings for non-existent fields 2010-05-25 07:57:49 -07:00
Michael Davidsaver
244796bbaa remove STATIC 2010-03-16 21:09:51 -04:00
Michael Davidsaver
36980c5a1a doc: note for dbScanLock 2010-03-16 21:09:51 -04:00
Andrew Johnson
b55cad9c16 Disable "redo last put on reconnection" for STRING writing to ENUM. 2009-12-22 23:43:52 +00:00
Janet B. Anderson
68b62dd4b3 Add rule to create depends file in O.<T_A> dir. Simplify Makefile. 2009-12-21 19:45:12 +00:00
Andrew Johnson
d0466179b0 dbNameToAddr() needs to adjust paddr->field_size when a $ modifier is used. 2009-11-18 16:55:04 +00:00
Andrew Johnson
534ca2c86e Make ellFree() a 1-argument macro, calls ellFree2() with free as freeFunc. 2009-08-28 18:34:38 +00:00
Andrew Johnson
0fb320c263 (M. Davidsaver): Use ELLLIST init macros. 2009-07-09 18:37:26 +00:00
Andrew Johnson
4e0ab97038 (M. Davidsaver): static keyword is part of C89,
remove all uses and internal definitions of LOCAL macro
2009-07-09 16:37:24 +00:00
Andrew Johnson
d6fcbe14ab Cleaned up dbDefs.h and errMdef.h
Added various #include lines needed in other sources.
2009-07-09 15:27:43 +00:00
Andrew Johnson
bf39f9935c Cosmetic. 2009-07-08 19:08:22 +00:00
Jeff Hill
162fa000c8 fix for compiler warnings in mantis 337 2009-07-07 23:54:41 +00:00
Andrew Johnson
68dbf8addd Added PINI values RUNNING and PAUSED, needed for Asyn. 2009-07-02 20:05:32 +00:00
Andrew Johnson
957c869c87 Fix off-by-1 error in dbPutFieldLink() when checking long input string. 2009-06-15 22:30:27 +00:00
Andrew Johnson
3c19da6b3b Allow INP/OUT to be set if DSET is NULL. 2009-06-15 20:52:36 +00:00
Andrew Johnson
917e83e391 Use epicsStrDup for allocation check. 2009-05-05 15:02:35 +00:00