Commit Graph

769 Commits

Author SHA1 Message Date
Andrew Johnson
46b912bc16 cas: Workaround for vxWorks-ppc604 compiler issue. 2010-10-29 12:15:48 -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
58b5b81cb3 cas: fixed new[] .. free() mismatch (in OOM path)
Found by cppchecker, http://cppcheck.sf.net/
2010-09-29 00:44:47 -05:00
Andrew Johnson
eda402cf66 Merged Ralph's ca-over-tcp branch.
Fixed some vxWorks compile errors, and made a number of edits
to the HTML in the CAref.html documentation.
2010-08-10 16:05:46 -05:00
Ralph Lange
23612a7afe Merged Codeathon 2008 changes (10292..10293 on cvs-trunk branch).
* Fixed conflicts until base compiles
 * COMPLETELY UNTESTED
2010-04-06 17:59:35 -04:00
Jeff Hill
140b8a468d we dont need tocheck the return from new with assert 2009-08-24 17:09:55 +00:00
Jeff Hill
fa24d119dd use verify instead of assert (in tests) 2009-08-24 17:07:03 +00:00
Jeff Hill
db3a655374 fixed improper calculation of signal needed state in postEvent
(this is an issue I introduced when writing the patch where IO
and subscription update events are maintained on seperate
and independent queues). The issue does not exist in an
EPICS base release.
2009-08-18 00:40:00 +00:00
Jeff Hill
8ae0c8960f corrected spelling in message 2009-08-18 00:36:22 +00:00
Jeff Hill
50ddd62502 o always arm the send independent of how many messages are placed
in the out buf. The send will not arm if the out buf is empty
o when receiving the io blocked state notify callback always reactivate the
receive if space is available
2009-08-13 23:55:03 +00:00
Jeff Hill
9fc48c9a6b always arm the send independent of how many messages are placed
in the out buf. The send will not arm if the out buf is empty.
2009-08-13 23:51:40 +00:00
Jeff Hill
e4075da4d7 o added new ioQue so the server will not wedge one of its clients
when simultaneouly in flow control mode and also asynchronous io
postponed mode.
o simplified the status from the process func because callers should
not need to know how many messages have been sent
2009-08-13 23:49:59 +00:00
Jeff Hill
8ace886cfe o added new ioQue so the server will not wedge one of its clients
when simultaneouly in flow control mode and also asynchronous io
postponed mode.
o simplified the status from the process func because callers should
not need to know how many messages have been sent
2009-08-13 23:42:37 +00:00
Jeff Hill
6c61c0de34 signal the io blocked list each time that server centric async io completes 2009-08-13 23:38:41 +00:00
Jeff Hill
e581e88223 simplified the return from eventSysProcess because callers should not need to
know how many messages were sent
2009-08-13 23:37:30 +00:00
Jeff Hill
f4cbdec5ee removed io blocked list signal because the base class does not
know if the blocked list is with the pv or the server
2009-08-13 23:32:18 +00:00
Jeff Hill
40b6d1b0ba moved IO pending count to caServer 2009-08-06 02:24:00 +00:00
Jeff Hill
4464cfedaa fixed warning message 2009-08-06 01:36:56 +00:00
Jeff Hill
b9fbf2e45b fixed error code numbering 2009-08-06 01:36:30 +00:00
Jeff Hill
42ce1bd2db o reset pendingResponseStatus, reqPayloadNeedsByteSwap,
responseIsPending, and pValueRead whenever removing a
message from the stream
o eliminated error prone reuse of status variables
o dont allow service to postpone IO when no IO is pending against the target
o be extra careful not to do things twice when send blocked or IO postponed
2009-08-06 00:06:59 +00:00
Jeff Hill
7de356519d o added pValueRead gdd snart pointer
o payloadNeedsByteSwap renamed to reqPayloadNeedsByteSwap
o added issuePosponeWhenNonePendingWarning static func
2009-08-05 23:58:40 +00:00
Jeff Hill
ff5ca5e041 added ioIsPending func 2009-08-05 23:56:26 +00:00
Jeff Hill
d1bb71809b added S_cas_posponeWhenNonePending status 2009-08-05 23:56:01 +00:00
Andrew Johnson
c035566d7d Use compile-time assertions, from Micheal Davidsaver. 2009-08-04 19:10:30 +00:00
Jeff Hill
e3a61ce4e4 fix for mantis 358 2009-08-03 22:09:52 +00:00
Jeff Hill
191668023b independent of whether receive bytes are pending or not. This improves
event latency, and allows events to flow if we are blocked due to the
service postponing an IO operation. This was a bug fix.

o call processMessage directly from the IO completion callback
that restarts when in an IO postponement state. This makes the logic easier
to understand and maintain, but isnt a functional change
o call processMessage directly from the receive callback.
This makes the logic easier to understand and maintain, but isnt
a functional change
o call processMessage directly from the send callback.
This makes the logic easier to understand and maintain, but isnt
a functional change
o removed the eventFlush function
2009-07-31 00:47:56 +00:00
Jeff Hill
7a23b74a76 o when processing subscription update events, always activate the send
independent of whether receive bytes are pending or not. This improves
event latency, and allows events to flow if we are blocked due to the
service postponing an IO operation. This was a bug fix.
o when finishing processing input activate a send if more than one half
of the TCP buffering would be used. In the past the send was not activated
until either the send buffer was full or the receive buffer (including any
bytes waiting in the socket) was empty. This could cause latency and
performance issues because send receive piplining would not occur if they
have very large buffers due to a large EPICS_CA_MAX_ARRAY_SIZE.
o always activate a send if we enter a service is postponing IO state. Users
would probably prefer to receive past responses and not wait until the
postponed IO initiates.

o casStrmClient::inBufBytesAvailable renamed to
casStrmClient:: inBufBytesPending reflecting the fact that we nlonger use
a socket ioctl to check how many bytes are pending in the sockets
input queue
o casStrmClient::outBufBytesPresent renamed to
casStrmClient::outBufBytesPending for consistency with inBufBytesPending
o removed the eventFlush function
o removed sendBlocked flag
o call processMessage directly from the IO completion callback
that restarts when in an IO postponement state. This makes the logic easier
to understand and maintain, but isnt a functional change
o call processMessage directly from the receive callback.
This makes the logic easier to understand and maintain, but isnt
a functional change
o call processMessage directly from the send callback.
This makes the logic easier to understand and maintain, but isnt
a functional change
2009-07-31 00:41:34 +00:00
Jeff Hill
511d818d18 o removed sendBlocked flag
o removed processInput function
o removed eventFlush function
o made casStreamIOWakeup and casStreamEvWakeup friends
2009-07-31 00:00:42 +00:00
Jeff Hill
f8565139c2 o removed sendBlocked flag
o removed processInput function
o removed eventFlush function
o made casDGEvWakeup, casDGIOWakeup, and
casStreamEvWakeup friends
2009-07-30 23:54:18 +00:00
Jeff Hill
30a02b365f incomingBytesPresent renamed to inCircuitBytesPending but this
function isnt currently used
2009-07-30 23:51:48 +00:00
Jeff Hill
b4bc931c72 incomingBytesPresent renamed to dgInBytesPending, but this function
is not currently used
2009-07-30 23:50:45 +00:00
Jeff Hill
e5d3815280 o removed bytesAvailable member function from inBuf because
we nolonger check the bytes in the socket  with an ioctl
o removed incomingBytesPresent virtual function from inBufClient interface
because we nolonger check the bytes in the socket  with an ioctl
2009-07-30 23:48:43 +00:00
Jeff Hill
ebd65e6e34 added an assert test 2009-07-30 23:45:14 +00:00
Jeff Hill
8c45eb4a19 o casStrmClient::inBufBytesAvailable renamed to
casStrmClient:: inBufBytesPending reflecting the fact that we nlonger use
a socket ioctl to check how many bytes are pending in the sockets
input queue
o  casStrmClient::outBufBytesPresent renamed to
casStrmClient::outBufBytesPending for consistency with inBufBytesPending
2009-07-30 23:43:21 +00:00
Jeff Hill
e1bb171f44 o casStrmClient::inBufBytesAvailable renamed to
casStrmClient:: inBufBytesPending reflecting the fact that we nlonger use
a socket ioctl to check how many bytes are pending in the sockets
input queue
o  casStrmClient::outBufBytesPresent renamed to
casStrmClient::outBufBytesPending for consistency with inBufBytesPending
o in casStrmClient :: processMsg () I forced status to S_cas_success at a couple
of loop exits. There is probably not a bug because the variable is initialized to
this value and the loop termintaes if the status isnt this value nevertheless
the corrected code is more robust to future changes.
o fixed a benign issue in casStrmClient :: processMsg () where if the user
sends a message to big for EPICS_MAX_ARRAY_SIZE and there is
currently no room in the output buffer then the user will not receive
a diagnostic message. With the patch the message will be sent later once
there is space.
2009-07-30 23:42:15 +00:00
Jeff Hill
656c2462d3 o casDGClient::inBufBytesAvailable renamed to
casDGClient :: inBufBytesPending reflecting the fact that we nlonger use
a socket ioctl to check how many bytes are pending in the sockets
input queue
o  casDGClient::outBufBytesPresent renamed to
casDGClient::outBufBytesPending for consistency with inBufBytesPending
2009-07-30 23:31:32 +00:00
Jeff Hill
f4ec20c8f0 casDGClient::inBufBytesAvailable renamed to
casDGClient :: inBufBytesPending reflecting the fact that we nlonger use
a socket ioctl to check how many bytes are pending in the sockets
input queue
2009-07-30 23:29:43 +00:00
Jeff Hill
ba11940aad removed debug printf 2009-07-25 01:24:50 +00:00
Jeff Hill
8725e4a67a removed debug printf 2009-07-25 01:23:18 +00:00
Jeff Hill
a6e57ba17a proper data type for socklen_t 2009-07-25 01:16:20 +00:00
Jeff Hill
7d137254af proper data type for socklen_t 2009-07-25 01:14:55 +00:00
Jeff Hill
31fb3775fd improved knowledge of the circuit's buffer size 2009-07-25 01:04:14 +00:00
Jeff Hill
1ba658b452 improved diagnostics 2009-07-25 00:44:21 +00:00
Jeff Hill
6eb25148c5 simplified tcp send interactions 2009-07-25 00:43:28 +00:00
Jeff Hill
dfdbe57fd3 fix for mantis 350 2009-07-18 03:56:25 +00:00
Jeff Hill
a55e69113e fixed mantis 350 2009-07-17 23:50:07 +00:00
Jeff Hill
9e49e0131f fix for mantis 348 2009-07-14 22:51:06 +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
Jeff Hill
f7bfbf73f8 additional patches for memory leaks (see mantis 340) 2009-07-07 23:09:21 +00:00