Commit Graph

173 Commits

Author SHA1 Message Date
Michael Davidsaver
4b3237a20d BlockingUDPTransport::enqueueSendRequest cleanup?
oh my was this bad code!  It isn't clear what
lock()/unlock() are guarding, but let them
continue as before, but don't swallow any exception,
or unlock twice.
2018-06-22 13:28:49 -07:00
Michael Davidsaver
d424202323 client: exception propagation from callbacks
Swallowing exceptions here hides some of our errors.
Particularly unrecoverable introspectionRegistry misses.
Instead, propagate up to Thread and close connection.
2018-06-22 13:28:49 -07:00
Michael Davidsaver
1670ff8f7c SerializationHelper cleanup and add error checks 2018-06-22 13:28:49 -07:00
Michael Davidsaver
c8292caf91 remote: Request larger stack for workers
Overflows observed on RTEMS/ppc (mvme6100).
2018-06-04 10:08:01 -07:00
Michael Davidsaver
7a523dd948 drop unused NOMINMAX 2018-05-18 15:20:26 -07:00
Michael Davidsaver
ba41fa6d62 notes 2018-05-18 15:17:27 -07:00
Michael Davidsaver
bab32c332a codec: notes on thread self dtor 2018-04-04 18:40:46 -07:00
Michael Davidsaver
54bb30fd86 reftrack BlockingUDPTransport 2018-04-04 18:31:12 -07:00
Michael Davidsaver
a8e26123c7 minor doc 2018-04-04 18:31:12 -07:00
Michael Davidsaver
7f5eb1de4d BlockingClientTCPTransportCodec collapse closedNotifyClients() into internalClose() 2018-04-04 18:31:12 -07:00
Michael Davidsaver
0eabf10005 codec: drop unused _shutdownEvent
using epicsThread::exitWait() instead
2018-04-04 18:31:12 -07:00
Michael Davidsaver
83a941c070 channelSearchManager minor 2018-04-04 14:53:52 -07:00
Michael Davidsaver
f2164ddb5a fix typedef in security.h
Can't refer to typedef in (private) remote.h
from (public) security.h
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
df14a19ae0 codec: eliminate internalPostClose()
no reason to distinguish before and after
send worker break is _requested_ (won't
actually be stopped).
2018-04-02 11:30:19 -07:00
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