Skip to content

Commit 7241f4e

Browse files
yosuke-wolfsslejohnstown
authored andcommitted
Add warning to make non-registered channelOpenCb visible
1 parent 3a5aa65 commit 7241f4e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/internal.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8920,6 +8920,12 @@ static int DoChannelOpen(WOLFSSH* ssh,
89208920
if (ssh->ctx->channelOpenCb) {
89218921
ret = ssh->ctx->channelOpenCb(newChannel, ssh->channelOpenCtx);
89228922
}
8923+
else {
8924+
WLOG(WS_LOG_WARN, "No channel open callback set "
8925+
"(call wolfSSH_CTX_SetChannelOpenCb()), accepting "
8926+
"channel open by default; typeId=%u, peerChannelId=%u",
8927+
(word32)typeId, peerChannelId);
8928+
}
89238929
if (ssh->channelListSz == 0)
89248930
ssh->defaultPeerChannelId = peerChannelId;
89258931
#ifdef WOLFSSH_FWD

0 commit comments

Comments
 (0)