Commit Graph

172 Commits

Author SHA1 Message Date
zimoch 3ba6679e67 removed spaces at end of line 2020-04-15 08:17:03 -07:00
zimoch 40300a12cb replaced tabs with spaces 2020-04-15 08:17:03 -07:00
Michael Davidsaver ef4bf9120e client: fix mixed up CID/SID in CMD_DESTROY_CHANNEL handler
servers send SID then CID
2020-04-07 13:13:23 -07:00
Michael Davidsaver 19d868eb7d start CID, SID, and IOID from different non-zero
Help to detect situations where these IDs get mixed up
2020-04-07 13:08:55 -07:00
Michael Davidsaver 4ef9c1102b no "invalid bit-set length"
Not actually an error case as BitSet storage is compacted.
2020-03-18 09:35:34 -07:00
Michael Davidsaver 245a09a199 client unconditionally clear existingBitSet
When reused (after reconnect) need to clear mask from previous
operation, which may be a different type from a different server
and just happen to have the same number of bits.
2020-03-18 09:35:34 -07:00
Michael Davidsaver a06c829050 bytes tx/rx stats per socket and per Operation 2019-07-15 14:06:06 -07:00
Michael Davidsaver b06aa1831f minor
disambiguate error messages
2019-07-15 14:03:50 -07:00
Michael Davidsaver a6e7d7f5fc Remove dead code
aliveNotification() and unresponsiveTransport() never called.
Remove these, and code only referenced through these methods.
2019-05-21 08:54:14 -07:00
Michael Davidsaver 64453e1f1a split client/server protocol version 2019-05-21 08:51:01 -07:00
Michael Davidsaver dfeb9fd5a5 more Troubleshoot "no more data in UDP packet" 2019-05-21 08:51:00 -07:00
Michael Davidsaver ecee708d3a redo hexDump
ludicrously inefficient (cf. toHex() ), and inflexible.
2019-05-21 08:51:00 -07:00
Michael Davidsaver 0084b6e60a de-virt Transport::getRevision()
Makes clear that this is/was only for TCP,
and eliminate redundant storage.  Also apply
locking to this storage.

Use header version directly in search handler.
Correct as only UDP search is actually used atm.
2019-05-20 17:48:10 -07:00
Michael Davidsaver be1bbe4aa8 const-ness 2019-05-20 17:48:10 -07:00
Michael Davidsaver 32ba2f32d0 avoid deprecated ByteBuffer::getArray()
use identical, but not overloaded, getBuffer()
2019-05-19 14:09:38 -07:00
Michael Davidsaver 736e0c169a Merge branch 'auth'
* auth:
  fix osdGetRoles
  oops
  Add showauth executable
  getgrouplist() on OSX has different sig.
  auth fix mingw static
  fix search PeerInfo
  PeerInfo in pva/server.h and pva/sharedstate.h
  make PeerInfo available during search phase
  auth status void accidental success.
  minor doc
  always need to link with netapi32 now
  authorize with local group lookup
  Add osdGetRoles()
  authorization framework
  pvasr show PeerInfo
  redo security (aka. access control)
  remove asCheck

# Conflicts:
#	src/server/pv/responseHandlers.h
#	src/server/responseHandlers.cpp
2019-05-12 14:40:29 -07:00
Michael Davidsaver 3fa1e83b55 avoid redundant sockaddr -> string 2019-04-17 09:35:43 -07:00
Michael Davidsaver fa484a883a redo security (aka. access control)
Break up monolithic SecurityPlugin API into three parts.

1. Authentication.
2. Authorization.
3. Access Control decision.  Left to ChannelProviders
2019-01-12 15:14:19 -08:00
Michael Davidsaver 3b4a52a360 remove usage of NoDefaultMethods 2019-01-12 12:02:25 -08:00
Michael Davidsaver 31261cee24 client context less noise 2018-09-25 18:55:21 -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 e08de8c2df detect Structure caching error
The assert in the client side copy is hit during
some kind of failure to keep the Field cache
up to date.
2018-06-22 13:28:49 -07:00
Michael Davidsaver 6ccca1ce58 const-ify string constants
yes really...
2018-05-18 10:12:34 -07:00
Michael Davidsaver a75720120c client: call ChannelSearchManager::cancel() 2018-04-24 12:33:54 -07:00
Michael Davidsaver 1e0523b7b9 client context. Prevent transport dtor under channel mutex.
m_channelMutex is locked recursively, so places like
disconnect(bool,bool) which purport to unlock for the
Transport detory actually don't as they are called
with m_channelMutex already locked.

Make a rather ugly hack of saving a ref to m_channel
at the various entry point.
2018-04-04 19:25:04 -07:00
Michael Davidsaver c9c8fb369a client context explicitly close() timer queue 2018-04-04 18:53:22 -07:00
Michael Davidsaver d4822f141c simplify InternalClientContextImpl::destroy()
Collapse internalDestroy() into destroy()
2018-04-04 18:50:58 -07:00
Michael Davidsaver 128d4b67f9 simplify InternalChannelImpl::destroy()
Collapse channel destroy(bool) and destroyChannel() into destroy()
2018-04-04 18:48:48 -07:00
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