From c3dd9bb43a2aa0cfe4eee9d497bac73b987c57dd Mon Sep 17 00:00:00 2001 From: zimoch Date: Wed, 18 May 2011 14:45:16 +0000 Subject: [PATCH] included in 3.14.12.1 --- errlog-atExit.patch | 17 --------- errlog-getNode.patch | 30 --------------- escape-paths.patch | 68 --------------------------------- rsrv.patch | 37 ------------------ thread-ca.patch | 91 -------------------------------------------- 5 files changed, 243 deletions(-) delete mode 100644 errlog-atExit.patch delete mode 100644 errlog-getNode.patch delete mode 100644 escape-paths.patch delete mode 100644 rsrv.patch delete mode 100644 thread-ca.patch diff --git a/errlog-atExit.patch b/errlog-atExit.patch deleted file mode 100644 index 024e317e7..000000000 --- a/errlog-atExit.patch +++ /dev/null @@ -1,17 +0,0 @@ -=== modified file 'src/libCom/error/errlog.c' ---- src/libCom/error/errlog.c 2010-11-15 21:46:40 +0000 -+++ src/libCom/error/errlog.c 2011-01-07 16:04:56 +0000 -@@ -119,10 +119,11 @@ - errlogInit(0); - if (pvtData.atExit || (isOkToBlock && pvtData.toConsole)) { - va_start(pvar, pFormat); -- vfprintf(stderr, pFormat, pvar); -+ nchar = vfprintf(stderr, pFormat, pvar); - va_end (pvar); - fflush(stderr); - } -+ if (pvtData.atExit) return nchar; - pbuffer = msgbufGetFree(isOkToBlock); - if (!pbuffer) return 0; - va_start(pvar, pFormat); - diff --git a/errlog-getNode.patch b/errlog-getNode.patch deleted file mode 100644 index 52b7cf57f..000000000 --- a/errlog-getNode.patch +++ /dev/null @@ -1,30 +0,0 @@ -=== modified file 'src/libCom/error/errlog.c' ---- src/libCom/error/errlog.c 2011-01-07 16:24:31 +0000 -+++ src/libCom/error/errlog.c 2011-03-01 18:02:19 +0000 -@@ -534,8 +534,10 @@ - char *plimit = pbuffer + pvtData.buffersize; - - pnextFree = plast->message + adjustToWorstCaseAlignment(plast->length); -- if (pfirst <= plast && -- pnextFree + pvtData.msgNeeded > plimit) { -+ if (pfirst > plast) { -+ plimit = (char *)pfirst; -+ } -+ else if (pnextFree + pvtData.msgNeeded > plimit) { - pnextFree = pbuffer; /* Hit end, wrap to start */ - plimit = (char *)pfirst; - } - -=== modified file 'src/libCom/test/epicsErrlogTest.c' ---- src/libCom/test/epicsErrlogTest.c 2010-09-30 19:36:30 +0000 -+++ src/libCom/test/epicsErrlogTest.c 2011-03-01 20:53:34 +0000 -@@ -282,7 +282,7 @@ - errlogFlush(); - testDiag("Logged %u messages", pvt.count); - -- testOk1(pvt.count == N+2); -+ testOk1(pvt.count == N+1); - - /* Clean up */ - errlogRemoveListener(&logClient); - diff --git a/escape-paths.patch b/escape-paths.patch deleted file mode 100644 index 69d1b01dc..000000000 --- a/escape-paths.patch +++ /dev/null @@ -1,68 +0,0 @@ -=== modified file 'src/registry/registerRecordDeviceDriver.pl' ---- src/registry/registerRecordDeviceDriver.pl 2010-03-08 23:31:19 +0000 -+++ src/registry/registerRecordDeviceDriver.pl 2010-12-16 19:43:51 +0000 -@@ -9,6 +9,10 @@ - # in file LICENSE that is included with this distribution. - #************************************************************************* - -+use FindBin qw($Bin); -+use lib "$Bin/../../lib/perl"; -+use EPICS::Path; -+ - ($file, $subname, $bldTop) = @ARGV; - $numberRecordType = 0; - $numberDeviceSupport = 0; -@@ -18,6 +22,10 @@ - $c_bad_ident_chars = '[^0-9A-Za-z_]'; - $subname =~ s/$c_bad_ident_chars/_/g; - -+# Process bldTop like convertRelease.pl does -+$bldTop = LocalPath(UnixPath($bldTop)); -+$bldTop =~ s/([\\"])/\\\1/g; # escape back-slashes and double-quotes -+ - open(INP,"$file") or die "$! opening file"; - while() { - next if m/ ^ \s* \# /x; - -=== modified file 'src/tools/convertRelease.pl' ---- src/tools/convertRelease.pl 2010-10-26 14:27:47 +0000 -+++ src/tools/convertRelease.pl 2010-12-16 19:45:46 +0000 -@@ -144,6 +144,7 @@ - - my $startup = $cwd; - $startup =~ s/^$root/$iocroot/o if ($opt_t); -+ $startup =~ s/([\\"])/\\\1/g; # escape back-slashes and double-quotes - - print OUT "startup = \"$startup\"\n"; - -@@ -156,6 +157,7 @@ - foreach my $app (@includes) { - my $iocpath = my $path = $macros{$app}; - $iocpath =~ s/^$root/$iocroot/o if ($opt_t); -+ $iocpath =~ s/([\\"])/\\\1/g; # escape back-slashes and double-quotes - my $app_lc = lc($app); - print OUT "$app_lc = \"$iocpath\"\n" - if (-d $path); -@@ -187,6 +189,7 @@ - foreach my $app (@includes) { - my $iocpath = my $path = $macros{$app}; - $iocpath =~ s/^$root/$iocroot/o if ($opt_t); -+ $iocpath =~ s/([\\"])/\\\1/g; # escape back-slashes and double-quotes - print OUT "epicsEnvSet(\"$app\",\"$iocpath\")\n" if (-d $path); - } - close OUT; - -=== modified file 'src/tools/fullPathName.pl' ---- src/tools/fullPathName.pl 2010-10-26 14:27:47 +0000 -+++ src/tools/fullPathName.pl 2010-12-16 22:49:00 +0000 -@@ -28,6 +28,9 @@ - - my $path = AbsPath(shift); - -+# Escape shell special characters unless on Windows, which doesn't allow them. -+$path =~ s/([!"\$&'\(\)*,:;<=>?\[\\\]^`{|}])/\\\1/g unless $^O eq 'MSWin32'; -+ - print "$path\n"; - - - diff --git a/rsrv.patch b/rsrv.patch deleted file mode 100644 index 665949847..000000000 --- a/rsrv.patch +++ /dev/null @@ -1,37 +0,0 @@ -=== modified file 'src/rsrv/caserverio.c' ---- src/rsrv/caserverio.c 2010-08-13 17:59:50 +0000 -+++ src/rsrv/caserverio.c 2011-01-13 16:22:04 +0000 -@@ -33,10 +33,6 @@ - #define epicsExportSharedSymbols - #include "server.h" - --/* As an optimisation, any message allocated with a large header is resized to -- * use a small header if the payload size is below this threshold. */ --#define SMALL_MESSAGE_THRESHOLD 65 -- - /* - * cas_send_bs_msg() - * -@@ -357,19 +353,8 @@ - if ( pMsg->m_postsize == htons ( 0xffff ) ) { - ca_uint32_t * pLW = ( ca_uint32_t * ) ( pMsg + 1 ); - assert ( size <= ntohl ( *pLW ) ); -- if (size < SMALL_MESSAGE_THRESHOLD) { -- /* If the message is sufficiently small it can be worth converting a -- * large message header into a small header. This saves us all of 8 -- * bytes over the wire, so it's not such a big deal. */ -- pMsg->m_postsize = htons((ca_uint16_t) size); -- pMsg->m_count = htons((ca_uint16_t) ntohl(pLW[1])); -- memmove(pLW, pLW + 2, size); -- size += sizeof(caHdr); -- } -- else { -- pLW[0] = htonl ( size ); -- size += sizeof ( caHdr ) + 2 * sizeof ( *pLW ); -- } -+ pLW[0] = htonl ( size ); -+ size += sizeof ( caHdr ) + 2 * sizeof ( *pLW ); - } - else { - assert ( size <= ntohs ( pMsg->m_postsize ) ); - diff --git a/thread-ca.patch b/thread-ca.patch deleted file mode 100644 index 9eaf3641d..000000000 --- a/thread-ca.patch +++ /dev/null @@ -1,91 +0,0 @@ -=== modified file 'src/ca/tcpiiu.cpp' ---- src/ca/tcpiiu.cpp 2010-09-20 21:21:50 +0000 -+++ src/ca/tcpiiu.cpp 2011-01-15 00:53:33 +0000 -@@ -1866,10 +1866,14 @@ - guard.assertIdenticalMutex ( this->mutex ); - - while ( nciu * pChan = this->createReqPend.get () ) { -+ pChan->channelNode::listMember = -+ channelNode::cs_none; - pChan->serviceShutdownNotify ( cbGuard, guard ); - } - - while ( nciu * pChan = this->createRespPend.get () ) { -+ pChan->channelNode::listMember = -+ channelNode::cs_none; - // we dont yet know the server's id so we cant - // send a channel delete request and will instead - // trust that the server can do the proper cleanup -@@ -1878,12 +1882,16 @@ - } - - while ( nciu * pChan = this->v42ConnCallbackPend.get () ) { -+ pChan->channelNode::listMember = -+ channelNode::cs_none; - this->clearChannelRequest ( guard, - pChan->getSID(guard), pChan->getCID(guard) ); - pChan->serviceShutdownNotify ( cbGuard, guard ); - } - - while ( nciu * pChan = this->subscripReqPend.get () ) { -+ pChan->channelNode::listMember = -+ channelNode::cs_none; - pChan->disconnectAllIO ( cbGuard, guard ); - this->clearChannelRequest ( guard, - pChan->getSID(guard), pChan->getCID(guard) ); -@@ -1891,6 +1899,8 @@ - } - - while ( nciu * pChan = this->connectedList.get () ) { -+ pChan->channelNode::listMember = -+ channelNode::cs_none; - pChan->disconnectAllIO ( cbGuard, guard ); - this->clearChannelRequest ( guard, - pChan->getSID(guard), pChan->getCID(guard) ); -@@ -1898,6 +1908,8 @@ - } - - while ( nciu * pChan = this->unrespCircuit.get () ) { -+ pChan->channelNode::listMember = -+ channelNode::cs_none; - pChan->disconnectAllIO ( cbGuard, guard ); - // if we know that the circuit is unresponsive - // then we dont send a channel delete request and -@@ -1907,6 +1919,8 @@ - } - - while ( nciu * pChan = this->subscripUpdateReqPend.get () ) { -+ pChan->channelNode::listMember = -+ channelNode::cs_none; - pChan->disconnectAllIO ( cbGuard, guard ); - this->clearChannelRequest ( guard, - pChan->getSID(guard), pChan->getCID(guard) ); -=== modified file 'src/libCom/osi/os/WIN32/osdThread.c' ---- src/libCom/osi/os/WIN32/osdThread.c 2011-01-15 01:00:02 +0000 -+++ src/libCom/osi/os/WIN32/osdThread.c 2011-02-11 22:33:58 +0000 -@@ -630,18 +630,21 @@ - free ( pParmWIN32 ); - return NULL; - } -+ -+ EnterCriticalSection ( & pGbl->mutex ); -+ ellAdd ( & pGbl->threadList, & pParmWIN32->node ); -+ LeaveCriticalSection ( & pGbl->mutex ); - - wstat = ResumeThread ( pParmWIN32->handle ); - if (wstat==0xFFFFFFFF) { -+ EnterCriticalSection ( & pGbl->mutex ); -+ ellDelete ( & pGbl->threadList, & pParmWIN32->node ); -+ LeaveCriticalSection ( & pGbl->mutex ); - CloseHandle ( pParmWIN32->handle ); - free ( pParmWIN32 ); - return NULL; - } - -- EnterCriticalSection ( & pGbl->mutex ); -- ellAdd ( & pGbl->threadList, & pParmWIN32->node ); -- LeaveCriticalSection ( & pGbl->mutex ); -- - return ( epicsThreadId ) pParmWIN32; - } -