From 215e0d02b4c70e716102ce03a879c2e2f81e0a6d Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Fri, 29 May 2026 20:35:39 +0000 Subject: [PATCH] nwconn: enable Release Logical Record Wire NCP 0x0c Release Logical Record to the existing logical-record release path. The Novell SDK documents NCP 0x2222/12 as releasing one synchronization string held by the calling client without removing it from the client's synchronization string table. The string remains logged and may be relocked by a later Lock Logical Record Set call. The handler already distinguished this from NCP 0x0b Clear Logical Record: 0x0b uses lock_flag -2 to unlock and unlog the record, while 0x0c uses lock_flag -1 to unlock only. Enable the previously disabled case label, add the SDK request/reply semantics to the inline endpoint comment, and remove the corresponding TODO entry. This only enables the documented endpoint path; the underlying locking implementation is unchanged. --- TODO.md | 2 -- src/nwconn.c | 20 ++++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/TODO.md b/TODO.md index acaf60f..cb075c5 100644 --- a/TODO.md +++ b/TODO.md @@ -67,8 +67,6 @@ Follow-up: or direct protocol tests: - `NCP 0x04 Lock File Set`: lock the current task's logged file set; related release/clear set calls already use `share_handle_lock_sets()`. - - `NCP 0x0c Release Logical Record`: re-enable and test the release-only - logical-record path, distinct from `0x0b` clear/unlog. - `NCP 0x16/0x18 Restore Directory Handle`: verify the exact SDK request/reply layout, then implement the documented function 22 / subfunction 24 directory-handle semantics. diff --git a/src/nwconn.c b/src/nwconn.c index da4c455..a54ce2f 100644 --- a/src/nwconn.c +++ b/src/nwconn.c @@ -525,13 +525,21 @@ static int handle_ncp_serv(void) break; case 0xb : /* Clear Logical Record */ - /* case 0xc :*/ { /* Release Logical Record */ + case 0xc : { /* Release Logical Record */ /* - * TODO(ncp-compat): Re-enable and test NCP 0x0c Release Logical - * Record. The implementation below already has the intended - * distinction: 0x0b clears a logical record (unlock + unlog), while - * 0x0c should only release/unlock it and leave it logged for later - * Lock Logical Record Set calls. + * SDK: NCP 0x2222/11 Clear Logical Record removes one logical + * record from the calling task's synchronization table. + * + * SDK: NCP 0x2222/12 Release Logical Record releases/unlocks one + * synchronization string held by the calling client. The request + * is a one-byte Synch Name Length followed by the Synch Name + * (up to 128 bytes), returns no reply data, and reports success or + * Unlock Error through the completion code. + * + * Important semantic difference: Release Logical Record leaves the + * string in the caller's synchronization string table so a later + * Lock Logical Record Set can relock it. Clear Logical Record + * unlocks and removes it from the table. */ struct INPUT { uint8 header[7]; /* Requestheader */