Skip to content

Commit 04a35e2

Browse files
committed
fwd: drop the declarations with no definition
wolfSSH_CTX_SetFwdEnable() and wolfSSH_SetFwdEnable() are declared in ssh.h and defined nowhere, so calling either is a link error rather than a way to gate forwarding. Nothing can depend on them today. - delete both declarations - say in the header that the WS_CallbackFwdIO passed to wolfSSH_CTX_SetFwdCb() is stored and never called; the parameter stays so existing calls still compile The third dead corner, the WOLFSSH_FWD_LOCAL_CLEANUP action the library never emits, needs a setup/cleanup pairing record and a callback that names the channel. That work is parked on ccb-phase2-local-cleanup.
1 parent 9731cfe commit 04a35e2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

wolfssh/ssh.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,9 @@ typedef enum WS_FwdCbError {
246246
* even though the setup returned success. */
247247
typedef int (*WS_CallbackFwd)(WS_FwdCbAction action, void* fwdCbCtx,
248248
const char* address, word32 port);
249+
/* Reserved. wolfSSH_CTX_SetFwdCb() stores one of these, but nothing in the
250+
* library calls it: forwarded data moves through the channel API. The
251+
* parameter is kept so existing calls still compile. */
249252
typedef int (*WS_CallbackFwdIO)(WS_FwdIoCbAction action, void* buf,
250253
word32 bufSz, void* fwdCbCtx);
251254

@@ -259,8 +262,6 @@ WOLFSSH_API WOLFSSH_CHANNEL* wolfSSH_ChannelFwdNewRemote(WOLFSSH* ssh,
259262
WOLFSSH_API int wolfSSH_CTX_SetFwdCb(WOLFSSH_CTX* ctx,
260263
WS_CallbackFwd fwdCb, WS_CallbackFwdIO fwdIoCb);
261264
WOLFSSH_API int wolfSSH_SetFwdCbCtx(WOLFSSH* ssh, void* ctx);
262-
WOLFSSH_API int wolfSSH_CTX_SetFwdEnable(WOLFSSH_CTX* ctx, byte enable);
263-
WOLFSSH_API int wolfSSH_SetFwdEnable(WOLFSSH* ssh, byte enable);
264265
DEPRECATED WOLFSSH_API WOLFSSH_CHANNEL* wolfSSH_ChannelFwdNew(WOLFSSH* ssh,
265266
const char* host, word32 hostPort, const char* origin,
266267
word32 originPort);

0 commit comments

Comments
 (0)