diff --git a/TODO.md b/TODO.md index d3530e4..b4f5243 100644 --- a/TODO.md +++ b/TODO.md @@ -167,6 +167,25 @@ Follow-up: - Capture and expose backend exit status where possible. - Consider direct CUPS integration only if MARS_NWE needs CUPS job IDs, cancellation, or status polling. Do not add a hard CUPS dependency for basic queue compatibility. +### Transaction Tracking System (TTS) + +Current status: + +- `NCP 0x22/0x00 TTS Is Available` reports the WebSDK-documented + unavailable status. +- MARS-NWE does not currently implement TTS rollback semantics, transaction + files, transaction status tracking, or the begin/end/abort transaction + state machine. +- Other TTS subfunctions remain unsupported instead of pretending to succeed + without real transaction tracking. + +Follow-up: + +- Implement TTS only if a concrete client requires it. +- Treat this as a real transaction subsystem, not as a completion-code shim: + the WebSDK TTS calls include begin/end/abort transaction, status, threshold, + and control/statistics operations. + ## Deferred / optional protocol work * Basic Packet Burst file transfer support is implemented and verified with a diff --git a/src/nwconn.c b/src/nwconn.c index 93cf99b..a0ab1a2 100644 --- a/src/nwconn.c +++ b/src/nwconn.c @@ -2359,10 +2359,27 @@ static int handle_ncp_serv(void) } break; - case 0x22 : { /* div TTS Calls */ + case 0x22 : { /* Transaction Tracking System (TTS) calls */ int ufunc = (int) *requestdata; - if (!ufunc) completition=0; /* TTS not availible */ - else completition=0xfb; /* request not known */ + /* + * WebSDK / headers: + * NCP 0x2222/34/00 TTS Is Available has no reply data. + * Its completion code is the status value: 0x00 means + * Transaction Tracking Unavailable, 0xfd means Disabled, + * and 0xff means Available. The SDK headers expose this + * as NWTTSIsAvailable(). + * + * MARS-NWE does not implement transaction tracking. Report + * the documented unavailable status for the availability + * probe, but keep the state-changing TTS subfunctions + * unsupported rather than pretending to begin, end, or abort + * transactions without rollback semantics. + * + * Cross-check: lwared and the Rust nwserver code do not + * provide a fuller TTS transaction implementation to mirror. + */ + if (!ufunc) completition=0; /* TTS unavailable */ + else completition=0xfb; /* request not known */ } break; case 0x23 : { /* div AFP Calls */