Commit Graph
18 Commits
Author SHA1 Message Date
Brad Arant 3609ed603e Merge tls into master: bring in subscription ownership, keep all TLS/stability work
tls and master diverged from a July 2024 fork point and never
reconciled - tls carries ~19 months of real socket/TLS stability
fixes (uninitialized tlsInfo, TCPServer::connectionRequest()
unconditionally initializing TLS, the WANT_READ write busy-spin, the
console authentication fix from this session), while master
independently picked up a Subscription/SubscriptionManager rework
(MString-based ownership tracking: owner/ownership/selection/time
fields and a working subscriptionOwner() method) that tls never had.

Every file both branches touched was resolved by keeping tls's side
entirely (Command.h, Socket.cpp, TCPServer.h, TCPSession.cpp/h,
TCPSocket.h were pure reformatting on master's side, or an
alternate/superseded fix for a bug tls already fixed a different way -
e.g. master's TCPSession uuid/alias handling vs tls's existing
uuid_unparse-based fix), with two deliberate exceptions:

- TCPServer.cpp's constructor was missing the
  commands.add(subscriptions, "publish"/"subscribe"/"catalog"/...)
  wiring master had - without it, SubscriptionManager existed but was
  completely unreachable through the normal command dispatch. Restored
  on top of tls's TLS-aware constructor.

- SubscriptionManager.cpp's "invite" command handler had a real
  incompatibility: master's version assigned into an `invitee` member
  typed as coreutils::MString via a stray `(coreutils::MString *)`
  cast that doesn't match the member's actual (non-pointer) type, and
  called session.server.getSessionByAlias() against a TCPServer
  reference - tls made TCPSession::server a pointer (part of removing
  the separate TCPSession2 class), so that call site no longer
  compiles as written. Took tls's cleaner local-variable version
  instead (functionally identical - looks up a session by alias and
  forwards an invite message) and removed the now-unused `invitee`
  member from SubscriptionManager.h.

One additional compile fix needed after resolving conflicts:
Subscription::subscriptionOwners is an MString (master's ownership
design), but TCPSession::alias is void* (tls's identity mechanism,
unchanged and depended on elsewhere) - MString has an implicit
constructor from void* already used successfully elsewhere in this
same file (the "publish" handler's Subscription constructor call),
but operator== doesn't accept the same implicit conversion, so
removeSessionSubscriptions()'s ownership check needed an explicit
coreutils::MString(session.alias) construction to compile.

Also drops output/main (a stray checked-in compiled binary, already
removed on tls) and the doxygen docs/html output (already removed on
tls, was carried on master since the fork).

Verified: full ServerCore rebuild (./compile) succeeds with zero
errors or warnings beyond the one compile fix documented above.
2026-09-06 13:09:15 +00:00
Brad Arant b7deabc5dc Rework for TLS. 2024-07-10 13:30:18 -07:00
Brad Arant 57f47fdecb Convert Subscription and SubscriptionManager to MString. 2023-10-26 18:28:51 -07:00
Matt Arant 3a75e920d9 Servercore Changes 2023-10-06 18:31:22 +00:00
Brad 9a39b6224c *NEXT/*DIE 2023-06-19 23:22:46 +00:00
Brad Arant 48be555724 fixed prolem with SessionFilter. 2023-06-12 15:25:03 -07:00
Brad Arant 043e725035 added sendToAll on Subscriptions that allows a SessionFilter object to be used to filter the list. 2023-06-12 15:15:12 -07:00
Brad Arant cb2a61bed9 Added a method to send to all subscribers on subscription. 2023-06-12 12:41:14 -07:00
Brad Arant e78f0cd4f8 Fixed subscription handler logic. 2023-06-12 08:52:44 -07:00
Brad Arant 8c9f4117ae Cleaned up the subscription handler stuff.' 2023-06-10 19:27:22 -07:00
Brad Arant b40cb9f5a4 Added support for the SubscriptionHandlerFactory object. 2023-06-10 16:01:56 -07:00
Brad 1e76a7f49a setup ignore update for .history files. 2023-02-08 03:31:51 +00:00
Brad 001cd8c06c Added SubscriptionHandler capability to Subscriptions. 2022-10-18 02:37:46 +00:00
Brad Arant 03a3799888 Mods to improve stability for Zephora. 2022-03-14 18:48:58 +00:00
Brad Arant d13e3f9fb5 Got the subscription event scope parameter added. 2022-02-13 00:23:56 +00:00
Brad Arant 16ffd60e75 Subscription system improvements. 2022-01-29 15:52:04 +00:00
Brad Arant 3ef82e0fce Compiles 2022-01-24 18:36:47 -08:00
Brad Arant ec39c1df1a Added subscription service capability. 2021-08-31 17:57:21 -07:00