Commit Graph

158 Commits

Author SHA1 Message Date
Michael Davidsaver
434a43dfe1 codec: less force-ful shutdown
eliminate unused 'force' argument.
2018-04-02 10:46:57 -07:00
Michael Davidsaver
da85d39c0c codec: const-ify socket
Avoid possible data race of changing _channel
before worker threads are joined.
Was just using this as a boolean flag for a method
which is already guarded in BlockingTCPTransportCodec::close()
from being called twice.
2018-04-02 10:41:30 -07:00
Michael Davidsaver
38965bb847 codec: collapse internalDestroy() into internalClose() 2018-04-02 10:24:35 -07:00
Michael Davidsaver
6c2d20353a minor, avoid extra string copys 2018-03-28 13:59:33 -07:00
Michael Davidsaver
a6d86d2a3c hide MockTransportSendControl 2018-03-28 13:49:21 -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
18758fa497 throw new doesn't work
javaism...
2018-02-13 18:07:58 -08:00
Michael Davidsaver
a266777d82 destroyAllChannels() swap out channels list
avoid possible modifications while iterating.
2018-02-13 17:58:56 -08:00
Michael Davidsaver
e8347f17b4 minor 2018-02-07 20:16:38 -08:00
Michael Davidsaver
24ffccf90d better TransportRegistry::remove()
now with the same complexity as the original...
2018-02-06 18:20:33 -08:00
Michael Davidsaver
40868b7b8b cleanup 2018-02-06 18:15:13 -08:00
Michael Davidsaver
c92045620a oops 2018-02-06 16:54:54 -08:00
Michael Davidsaver
d41d15d59e drop some dead code 2018-02-01 19:51:32 -08:00
Michael Davidsaver
606669c62b less verbose error message when ::connect() fails 2018-02-01 19:51:15 -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
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
5a86835a6f add ref-counter for Transport ABC 2018-02-01 11:17:56 -08:00
Michael Davidsaver
3bb2f25bed Merge remote-tracking branch 'origin/master'
* origin/master:
  prevent CAChannel::disconnectChannel() from calling ca_clear_channel twice This was causing a crash when exiting
  Revert "When caProvider is destroyed make sure all channels are cleared"
  make changes suggested by andrew that remove warning messages
  Clean up compiler warnings
  fix issue #77
2018-01-31 11:51:57 -08:00
Michael Davidsaver
9daf7a0cad remove unnecessary includes 2018-01-31 11:51:13 -08:00
Andrew Johnson
fa46935d35 Clean up compiler warnings 2018-01-04 17:52:36 -06:00
Michael Davidsaver
903d117485 pvAccessLog() add EPICS_PRINTF_STYLE()
and fixup incorrect specifiers
2017-12-28 10:49:54 -06:00
Michael Davidsaver
c30d4347d0 notate BlockingUDPTransport w/ OVERRIDE FINAL
and de-virtualize methods never actual overridden
2017-12-19 11:38:26 -06:00
Michael Davidsaver
a10534d74d eliminate Connector interface
no code generically creates UDP or TCP connections,
so this abstraction results only in unnecessary
virtual calls and casts.
2017-12-19 11:38:26 -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
ba3b777978 missed one
cf 2f0bb7d448
2017-11-16 11:18:13 -06:00
Michael Davidsaver
2f0bb7d448 "Not-a-first segmented message" is a critical error
Let's try to scare users into reporting it more promptly.
2017-11-15 19:38:26 -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
073c77b1ef consolidate ServerChannel and ServerChannelImpl
"interface" with a single implementation.
combine and de-virtualize.
2017-11-06 15:14:41 -06:00
Michael Davidsaver
1d7f15de25 combine AbstractResponseHandler and ResponseHandler 2017-11-06 14:27:46 -06:00
Michael Davidsaver
aaef110507 eliminate ChannelHostingTransport
an "interface" used once.  Drop it and de-virtualize.
2017-11-06 13:41:58 -06:00
Michael Davidsaver
dcb74b781d be explicit about epics::auto_ptr 2017-11-06 12:46:13 -06:00
Michael Davidsaver
9bf03fbfbe no more returning auto_ptr 2017-11-06 12:44:36 -06:00
Michael Davidsaver
0fde239f23 std::auto_ptr -> epics::auto_ptr 2017-11-06 12:37:42 -06:00
Michael Davidsaver
f91b593aea no need to dllexport inline class w/o virtuals 2017-11-06 11:02:08 -06:00
Michael Davidsaver
161280220e avoid std::min 2017-11-06 10:57:09 -06:00
Michael Davidsaver
8d5c27143b pvasr list client channels 2017-11-05 17:11:28 -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
47332fdf90 server status reporting via iocsh 2017-11-05 15:59:01 -06:00
Michael Davidsaver
90394f788e minor 2017-09-06 12:37:42 -05:00
Michael Davidsaver
90e8276758 fixup point to point interface handling.
with bcast interfaces, send searches to bcast address
and !WIN32 binds bcast address to receive searches.

with point to point, send searches to dest address.
can't bind dest address (not local).

quiets spurious error message:

> Error binding socket: Cannot assign requested address.

Encountered with a P2P link setup by openvpn.
2017-09-06 10:38:20 -05:00
Michael Davidsaver
9bf307712b improve UDP bind error 2017-09-06 09:52:53 -05:00
Michael Davidsaver
27ec187bd4 inetAddressUtil no more new vector
no more allocating vector.
2017-09-02 09:55:15 -05:00
Michael Davidsaver
9a09e5790e blockingUDP: simplify vector* members 2017-09-02 09:55:15 -05:00
Michael Davidsaver
79874e1811 reftrack more classes
include the common abstract bases used by all ChannelProviders.
2017-09-02 09:55:15 -05:00
Michael Davidsaver
98df225583 insturment with reftrack 2017-08-30 11:17:03 -05:00