Compare commits

..

9 Commits

Author SHA1 Message Date
Ralph Lange
65574b5971 Update CONFIG_BASE_VERSION for 3.15.4, remove "not released" from RELEASE_NOTES 2016-05-27 08:54:04 +02:00
Andrew Johnson
4284222b54 Convert GUI_ promptgroup strings to new-style 2016-05-26 16:15:48 +02:00
Ralph Lange
54bab1e2f0 pcas: fix compiler warning (gcc 5.3.1) 2016-05-26 14:14:56 +02:00
Andrew Johnson
df200de27f Fix lsi/lso puts with DBF_STRING data 2016-05-26 13:49:18 +02:00
Ralph Lange
22d6ebe7e1 Merge changes from 3.14 branch up to rev 12642 2016-05-26 13:18:38 +02:00
Ralph Lange
9c3ed1bfe2 catools: fix escape handling when sending long strings 2016-05-26 13:13:29 +02:00
Ralph Lange
23fd4e202b ca: Fix client bug (race condition) in ipAddrToAsciiEngine 2016-05-25 12:26:32 +02:00
Andrew Johnson
a5b8b0b890 Use fabs() in calcPerform 2016-05-24 11:12:25 +02:00
Andrew Johnson
988614ae8a Reset SNAPSHOT after -rc1 tagged 2016-05-22 06:06:53 +02:00
14 changed files with 98 additions and 45 deletions

View File

@@ -41,11 +41,11 @@ EPICS_PATCH_LEVEL = 0
#EPICS_DEV_SNAPSHOT=-pre1-DEV
#EPICS_DEV_SNAPSHOT=-pre2
#EPICS_DEV_SNAPSHOT=-pre2-DEV
EPICS_DEV_SNAPSHOT=-rc1
#EPICS_DEV_SNAPSHOT=-rc1
#EPICS_DEV_SNAPSHOT=-rc1-DEV
#EPICS_DEV_SNAPSHOT=-rc2
#EPICS_DEV_SNAPSHOT=-rc2-DEV
#EPICS_DEV_SNAPSHOT=
EPICS_DEV_SNAPSHOT=
# No changes should be needed below here

View File

@@ -1,22 +1,22 @@
# CONFIG_SITE.Common.cygwin-x86_64
#
# $Revision-Id$
#
# Site Specific definitions for cygwin-x86_64 target
# Only the local epics system manager should modify this file
# If readline is installed uncomment the following line
# to add command-line editing and history support
#COMMANDLINE_LIBRARY = READLINE
# Uncomment the following line if readline has problems
#LDLIBS_READLINE = -lreadline -lcurses
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g
# CONFIG_SITE.Common.cygwin-x86_64
#
# $Revision-Id$
#
# Site Specific definitions for cygwin-x86_64 target
# Only the local epics system manager should modify this file
# If readline is installed uncomment the following line
# to add command-line editing and history support
#COMMANDLINE_LIBRARY = READLINE
# Uncomment the following line if readline has problems
#LDLIBS_READLINE = -lreadline -lcurses
# It makes sense to include debugging symbols even in optimized builds
# in case you want to attach gdb to the process or examine a core-dump.
# This does cost disk space, but not memory as debug symbols are not
# loaded into RAM when the binary is loaded.
OPT_CFLAGS_YES += -g
OPT_CXXFLAGS_YES += -g

View File

@@ -9,9 +9,6 @@
<body lang="en">
<h1 align="center">EPICS Base Release 3.15.4</h1>
<p style="color:red">This version of EPICS Base has not been released yet.</p>
<h2 align="center">Changes made on the 3.15 branch since 3.15.3</h2>
<!-- Insert new items immediately below here ... -->
@@ -58,6 +55,12 @@ plus space-dash-space to allow proper sorting of groups.</p>
has been deprecated. Instead, use the conversion functions between index number
and group string that have been added to dbStaticLib.</p>
<p>When a DBD file containing record-type descriptions is expanded, any
old-style <tt>GUI_xxx</tt> group names will be replaced by a new-style
string for use by the IOC. This permits an older record type to be used with
the 3.15.4 release, although eventually record types should be converted by
hand with better group names used.</p>
<h3>CA server configuration changes</h3>
<p>RSRV now honors EPICS_CAS_INTF_ADDR_LIST and binds only to the provided list

View File

@@ -333,6 +333,12 @@ cac::~cac ()
this->ipToAEngine.release ();
// clean-up the list of un-notified msg objects
while ( msgForMultiplyDefinedPV * msg = this->msgMultiPVList.get() ) {
msg->~msgForMultiplyDefinedPV ();
this->mdpvFreeList.release ( msg );
}
errlogFlush ();
osiSockRelease ();
@@ -606,6 +612,8 @@ void cac::transferChanToVirtCircuit (
msgForMultiplyDefinedPV * pMsg = new ( this->mdpvFreeList )
msgForMultiplyDefinedPV ( this->ipToAEngine,
*this, pChan->pName ( guard ), acc );
// cac keeps a list of these objects for proper clean-up in ~cac
this->msgMultiPVList.add ( *pMsg );
// It is possible for the ioInitiate call below to
// call the callback directly if queue quota is exceeded.
// This callback takes the callback lock and therefore we
@@ -1297,6 +1305,8 @@ void cac::pvMultiplyDefinedNotify ( msgForMultiplyDefinedPV & mfmdpv,
epicsGuard < epicsMutex > guard ( this->mutex );
this->exception ( mgr.cbGuard, guard, ECA_DBLCHNL, buf, __FILE__, __LINE__ );
}
// remove from the list and delete msg object
this->msgMultiPVList.remove ( mfmdpv );
mfmdpv.~msgForMultiplyDefinedPV ();
this->mdpvFreeList.release ( & mfmdpv );
}

View File

@@ -237,6 +237,7 @@ private:
resTable < tcpiiu, caServerID > serverTable;
tsDLList < tcpiiu > circuitList;
tsDLList < SearchDest > searchDestList;
tsDLList < msgForMultiplyDefinedPV > msgMultiPVList;
tsFreeList
< class tcpiiu, 32, epicsMutexNOOP >
freeListVirtualCircuit;

View File

@@ -55,8 +55,10 @@ msgForMultiplyDefinedPV::~msgForMultiplyDefinedPV ()
void msgForMultiplyDefinedPV::transactionComplete ( const char * pHostNameRej )
{
// calls into cac for the notification
// the msg object (= this) is being deleted as part of the notification
this->cb.pvMultiplyDefinedNotify ( *this, this->channel, this->acc, pHostNameRej );
// !! dont touch this pointer after this point because object has been deleted !!
// !! dont touch 'this' pointer after this point because object has been deleted !!
}
void * msgForMultiplyDefinedPV::operator new ( size_t size,

View File

@@ -33,6 +33,7 @@
#include "ipAddrToAsciiAsynchronous.h"
#include "tsFreeList.h"
#include "tsDLList.h"
#include "compilerDependencies.h"
#ifdef msgForMultiplyDefinedPVh_epicsExportSharedSymbols
@@ -47,7 +48,9 @@ public:
const char * pAcc, const char * pRej ) = 0;
};
class msgForMultiplyDefinedPV : public ipAddrToAsciiCallBack {
class msgForMultiplyDefinedPV :
public ipAddrToAsciiCallBack,
public tsDLNode < msgForMultiplyDefinedPV > {
public:
msgForMultiplyDefinedPV ( ipAddrToAsciiEngine & engine,
callbackForMultiplyDefinedPV &, const char * pChannelName,
@@ -62,8 +65,8 @@ private:
ipAddrToAsciiTransaction & dnsTransaction;
callbackForMultiplyDefinedPV & cb;
void transactionComplete ( const char * pHostName );
msgForMultiplyDefinedPV ( const msgForMultiplyDefinedPV & );
msgForMultiplyDefinedPV & operator = ( const msgForMultiplyDefinedPV & );
msgForMultiplyDefinedPV ( const msgForMultiplyDefinedPV & );
msgForMultiplyDefinedPV & operator = ( const msgForMultiplyDefinedPV & );
void operator delete ( void * );
};

View File

@@ -492,14 +492,13 @@ int main (int argc, char *argv[])
} else { /* Not an ENUM */
if (charArrAsStr) {
count = len;
dbrType = DBR_CHAR;
ebuf = calloc(strlen(cbuf)+1, sizeof(char));
ebuf = calloc(len, sizeof(char));
if(!ebuf) {
fprintf(stderr, "Memory allocation failed\n");
return 1;
}
epicsStrnRawFromEscaped(ebuf, strlen(cbuf)+1, cbuf, strlen(cbuf));
count = epicsStrnRawFromEscaped(ebuf, len, cbuf, len-1) + 1;
} else {
for (i = 0; i < count; ++i) {
epicsStrnRawFromEscaped(sbuf[i], sizeof(EpicsStr), *(argv+optind+i), sizeof(EpicsStr));

View File

@@ -348,10 +348,8 @@ caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg,
//
caStatus casDGClient::searchFailResponse ( const caHdrLargeArray * mp )
{
int status;
epicsGuard < epicsMutex > guard ( this->mutex );
status = this->out.copyInHeader ( CA_PROTO_NOT_FOUND, 0,
this->out.copyInHeader ( CA_PROTO_NOT_FOUND, 0,
mp->m_dataType, mp->m_count, mp->m_cid, mp->m_available, 0 );
this->out.commitMsg ();

View File

@@ -155,7 +155,7 @@ epicsShareFunc long
break;
case ABS_VAL:
if (*ptop < 0.0) *ptop = - *ptop;
*ptop = fabs(*ptop);
break;
case EXP:

View File

@@ -265,12 +265,16 @@ void ipAddrToAsciiEnginePrivate::run ()
continue;
}
// fix for lp:1580623
// a destructing cac sets pCurrent to NULL, so
// make local copy to avoid race when releasing the guard
ipAddrToAsciiTransactionPrivate *pCur = this->pCurrent;
this->callbackInProgress = true;
{
epicsGuardRelease < epicsMutex > unguard ( guard );
// dont call callback with lock applied
this->pCurrent->pCB->transactionComplete ( this->nameTmp );
pCur->pCB->transactionComplete ( this->nameTmp );
}
this->callbackInProgress = false;

View File

@@ -158,9 +158,10 @@ static long put_array_info(DBADDR *paddr, long nNew)
{
lsiRecord *prec = (lsiRecord *) paddr->precord;
if (nNew == prec->sizv)
--nNew; /* truncated string */
prec->val[nNew] = 0; /* ensure data is terminated */
if (nNew >= prec->sizv)
nNew = prec->sizv - 1; /* truncated string */
if (paddr->field_type == DBF_CHAR)
prec->val[nNew] = 0; /* ensure data is terminated */
return 0;
}

View File

@@ -200,9 +200,10 @@ static long put_array_info(DBADDR *paddr, long nNew)
{
lsoRecord *prec = (lsoRecord *) paddr->precord;
if (nNew == prec->sizv)
--nNew; /* truncated string */
prec->val[nNew] = 0; /* ensure data is terminated */
if (nNew >= prec->sizv)
nNew = prec->sizv - 1; /* truncated string */
if (paddr->field_type == DBF_CHAR)
prec->val[nNew] = 0; /* ensure data is terminated */
return 0;
}

View File

@@ -39,6 +39,35 @@ our %field_attrs = (
prop => qr/^(?:YES|NO)$/
);
# Convert old promptgroups into new-style
my %promptgroupMap = (
GUI_COMMON => '10 - Common',
GUI_ALARMS => '70 - Alarm',
GUI_BITS1 => '41 - Bits (1)',
GUI_BITS2 => '42 - Bits (2)',
GUI_CALC => '30 - Action',
GUI_CLOCK => '30 - Action',
GUI_COMPRESS => '30 - Action',
GUI_CONVERT => '60 - Convert',
GUI_DISPLAY => '80 - Display',
GUI_HIST => '30 - Action',
GUI_INPUTS => '40 - Input',
GUI_LINKS => '40 - Link',
GUI_MBB => '30 - Action',
GUI_MOTOR => '30 - Action',
GUI_OUTPUT => '50 - Output',
GUI_PID => '30 - Action',
GUI_PULSE => '30 - Action',
GUI_SELECT => '40 - Input',
GUI_SEQ1 => '51 - Output (1)',
GUI_SEQ2 => '52 - Output (2)',
GUI_SEQ3 => '53 - Output (3)',
GUI_SUB => '30 - Action',
GUI_TIMER => '30 - Action',
GUI_WAVE => '30 - Action',
GUI_SCAN => '20 - Scan',
);
sub new {
my ($class, $name, $type) = @_;
dieContext("Illegal field type '$type', valid field types are:",
@@ -76,6 +105,8 @@ sub number {
sub add_attribute {
my ($this, $attr, $value) = @_;
unquote $value;
$value = $promptgroupMap{$value}
if $attr eq 'promptgroup' && exists $promptgroupMap{$value};
my $match = $field_attrs{$attr};
if (defined $match) {
dieContext("Bad value '$value' for field attribute '$attr'")