In this commit the channel access client is modified to allow a zero
size request in a caget or camonitor call. This is passed through to
the corresponding CA_PROTO_READ_NOTIFY or CA_PROTO_EVENT__ADD message,
but only if the minor version of the protocol is >=13.
This commit also adds a new protocol test, CA_V413(), which detects a
server which claims to understand the new zero length request.
Finally, this commit prepares for a subtle change in the CA protocol.
A request for a zero length subscription or data request, which will
only be made for protocol version 4.13 and above, is interpreted as a
request for autosized data, where the intrinsic dynamic length of the
requested waveform should be returned.
With the synchronous ca_array_get() call there is no mechanism available
to pass back the size of the retrieved data if it is different from
the requested count, so the simplest thing is to ensure we don't
request autosizing data through this api.
* Pulled out tcpiiu::SearchDestTCP to have cac create the SearchDest independent from the TCP circuit
* Reorganized the relation between the SearchDestTCP and the TCP circuit:
- SearchDest stays always on the cac list
- TCP connection going down sets SearchDest inactive and SearchDestTCP's circuit member to NULL
- Next seach request creates the new TCP circuit and sets SearchDestTCP's member, but leaves SearchDest inactive
- Successful connect sets SearchDest active
* ReceiveThread releases the cac mutex before going to sleep in connect loop
o the flow control contig frame thresh should be based on max array size
o it appears that the wakeup mechanism for the send thread, who sends
the flow control on/off messages was broken
o looking at full buffers isnt a perfect detection scheme compared to
the simpler approach of just checking to see if bytes are pending in
the socket before calling recv
vulnerable if the following function indicates recv bytes are pending but
recv blocks anyways.
osiSockIoctl_t bytesPending = 0;
int status = socket_ioctl ( this->sock, FIONREAD, & bytesPending );
and receive thread are blocking for the preeemptive callback control lock
I also added a guard in a place that appeared to be not adaquately
protected.
o application could hang for too long in ca_context_destroy() attempting a
clean shutdown if circuit is known to be unresponsive
o unexpected errno from recv message was improperrly supressed
for locally initiated circuit abort