Commit Graph

144 Commits

Author SHA1 Message Date
Michael Davidsaver e97354db61 client context collapse channel createChannel() into searchResponse() 2018-04-04 18:44:11 -07:00
Michael Davidsaver 192955e7b5 client context: don't call cancel()
it doesn't do anything!
2018-04-04 14:55:41 -07:00
Michael Davidsaver 18491f6eb3 const-ify AbstractClientResponseHandler::_context 2018-04-04 10:12:44 -07:00
Michael Davidsaver 9e090fa191 client context: avoid lock order violations
avoid ordering violation of calling checkAndGetTransport(),
which locks channel mutex, while request mutex is locked.
2018-04-04 10:12:44 -07:00
Michael Davidsaver 8068ab3454 eliminate unnecessary m_nullMonitorElement 2018-04-04 10:12:44 -07:00
Michael Davidsaver 40ecc93e9d client context: use mutex guards
whether this locking is necessary is another question...
2018-04-04 10:12:44 -07:00
Michael Davidsaver fe5780521b Context::getSecurityPlugins() no return of non-const ref.
Return of map as non-const ref. allows callers to modify.
Probably unintended.
2018-04-04 09:09:43 -07:00
Michael Davidsaver 6c2d20353a minor, avoid extra string copys 2018-03-28 13:59:33 -07:00
Michael Davidsaver 735dc22e2d collapse SimpleChannelSearchManagerImpl into ChannelSearchManager
Virtual base with only one sub-class.  So avoid some unnecessary
indirection.
2018-03-28 13:37:42 -07:00
Michael Davidsaver 1a100a0955 client fix init order leading to *NULL
Avoid a race between the main thread alloc of SimpleChannelSearchManagerImpl
the the UDP socket worker trying to use the same.

Split allocation and initialization of search manager
around socket creation and worker start.

Also in-line initializeUDPTransport() to only call site.
2018-03-28 13:21:46 -07:00
Michael Davidsaver aec1c7c9d7 client search: cleanup context pointer handling 2018-03-28 11:25:54 -07:00
Michael Davidsaver 79ada524fa getRequester() may return NULL 2018-02-20 11:28:32 -08:00
Michael Davidsaver 5f9508a3b1 demote getTransport() fialure message to debug
the connect() will be retried, so this isn't fatal.
2018-02-01 20:04:03 -08:00
Michael Davidsaver 9b828852c0 Transport::getRemoteAddress() return reference
make it clear that result is always !NULL
2018-02-01 19:09:44 -08:00
Michael Davidsaver f1defe4e9f mark NamedLockPattern as deprecated
just too hard to use (exception) safely
2018-02-01 19:00:38 -08:00
Michael Davidsaver 58f996fd98 update transportRegistry
avoid leaks of SOCKET and leaving mutex locked
when exceptions are thrown.
2018-02-01 18:54:25 -08:00
Michael Davidsaver d33356ced6 drop deprecated 2018-01-31 12:48:59 -08:00
Michael Davidsaver 9daf7a0cad remove unnecessary includes 2018-01-31 11:51:13 -08:00
Michael Davidsaver 903d117485 pvAccessLog() add EPICS_PRINTF_STYLE()
and fixup incorrect specifiers
2017-12-28 10:49:54 -06:00
Michael Davidsaver 0161799c93 must zero osiSockAddr prior to use!
RTEMS depends on this or eg. bind()
will fail because comparison with
list of interface addresses is done
with memcmp()!
2017-11-28 17:54:25 -06:00
Michael Davidsaver d4eb31e729 silence warning
the 'done' flag avoids actual use of uninitialized 'size'.
2017-11-28 17:54:25 -06:00
Michael Davidsaver 3f51c74ba1 fix mingw build error 2017-11-16 18:47:39 -06:00
Michael Davidsaver cf7827ceab quiet mingw include order warning
#warning Please include winsock2.h before windows.h
2017-11-16 18:45:44 -06:00
Michael Davidsaver e626ca0aaf client const-ify where possible 2017-11-16 17:38:11 -06:00
Michael Davidsaver f45de1de68 client minor locking 2017-11-16 17:38:11 -06:00
Michael Davidsaver 8e846b02bc tighten up validation 2017-11-16 17:38:11 -06:00
Michael Davidsaver cc9c666731 Improve client pvRequest option parsing
Give some notice of parse errors
2017-11-16 17:38:11 -06:00
Michael Davidsaver 00e01d5211 tighten up client operation send state handling 2017-11-16 17:03:10 -06:00
Michael Davidsaver 1d56ee7283 pva client ignore CMD_DESTROY_REQUEST reply.
Presently CMD_DESTROY_REQUEST and CMD_CANCEL_REQUEST aren't acknowledged.
This allows ambiguity in when the request ioid goes out of scope.

Currently, the client forgets about an ioid as soon as the destroy request is sent.
So any in-flight response will be erroneously flagged as "Undecipherable message".

Similarly, a cancel request can cross paths with a reply.
This creates confusion in the event the client starts a new
request immediately after canceling the first.

Let's build some forward compatibility by ignoring replies to
cancel and destroy requests.
2017-11-16 17:03:10 -06:00
Michael Davidsaver b3fcffb18e avoid magic number 2017-11-16 14:56:59 -06:00
Michael Davidsaver 6f39f02f3a more client locking violations
As with #72 more use of m_pendingRequest w/o locking
2017-11-16 14:56:48 -06:00
Michael Davidsaver 5bcbc0d717 Incorrect locking in client monitor 2017-11-15 20:02:25 -06:00
Michael Davidsaver 576b241faa consolidate TransportClient and ChannelImpl as ClientChannelImpl 2017-11-06 15:51:43 -06:00
Michael Davidsaver 7118e34222 merge DataResponse into ResponseRequest
DataResponse is only sub-"interface"/class of ResponseRequest.
2017-11-06 15:26:05 -06:00
Michael Davidsaver 3154e3431e consolidate SubscriptionRequest with BaseRequestImpl
"interface" with a single implementation.
combine and de-virtualize
2017-11-06 15:22:09 -06:00
Michael Davidsaver 1d7f15de25 combine AbstractResponseHandler and ResponseHandler 2017-11-06 14:27:46 -06:00
Michael Davidsaver dcb74b781d be explicit about epics::auto_ptr 2017-11-06 12:46:13 -06:00
Michael Davidsaver 49173ec884 disable pvAccessMB and unused ref-counting boilerplate 2017-11-05 16:54:10 -06:00
Michael Davidsaver 5e900b1f11 remove super abstract authNZInitialize(void*)
with separate client and server calls.

Still dynamic_cast ugliness as Transport and Codec
hierarchies don't have a common root.
2017-11-05 16:41:59 -06:00
Michael Davidsaver 7ca0688326 second destroy() is a no-op 2017-11-01 14:17:55 -05:00
Michael Davidsaver b1444b6192 client: fix monitor crash on type change 2017-09-29 15:23:14 -05:00
Michael Davidsaver 0a9797f962 detect type change bug 2017-09-28 16:48:16 -05:00
Michael Davidsaver 5137b90f56 minor client message handling
avoid unnecessary dynamic_cast
2017-09-06 13:49:24 -05:00
Michael Davidsaver 27ec187bd4 inetAddressUtil no more new vector
no more allocating vector.
2017-09-02 09:55:15 -05:00
Michael Davidsaver 98df225583 insturment with reftrack 2017-08-30 11:17:03 -05:00
Michael Davidsaver 561ea53198 Revert "avoid unnecessary temp. vector"
This reverts commit 623596f327.

Turns out it is necessary as reportStatus()
can modify m_responseRequests
2017-08-16 10:34:43 +02:00
Michael Davidsaver 623596f327 avoid unnecessary temp. vector 2017-07-19 16:20:00 +02:00
Michael Davidsaver 23133e5c10 disambiguate Destroyable
MSVC gets confused by 'using epics::pvData'
which pulls in typedef.
2017-07-17 16:32:22 +02:00
Michael Davidsaver 2c530868f6 split out caprovider as libpvAccessCA
fixup multi-library build
2017-07-17 13:51:20 +02:00
Michael Davidsaver 39a69fc155 unnecessary include of deprecated 2017-07-17 11:27:19 +02:00