mirror of https://github.com/wolfSSL/wolfssh.git
Channel Callbacks (EOF and Close)
1. Add checks for the Channel EOF or Close callbacks to the Do functions for those messages, and call them.pull/713/head
parent
06b70db8f4
commit
e1a5ffd231
|
@ -7958,6 +7958,12 @@ static int DoChannelEof(WOLFSSH* ssh,
|
|||
ret = WS_INVALID_CHANID;
|
||||
}
|
||||
|
||||
if (ret == WS_SUCCESS) {
|
||||
if (ssh->ctx->channelEofCb) {
|
||||
ssh->ctx->channelEofCb(channel, ssh->channelEofCtx);
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == WS_SUCCESS) {
|
||||
channel->eofRxd = 1;
|
||||
if (!channel->eofTxd) {
|
||||
|
@ -7991,6 +7997,12 @@ static int DoChannelClose(WOLFSSH* ssh,
|
|||
ret = WS_INVALID_CHANID;
|
||||
}
|
||||
|
||||
if (ret == WS_SUCCESS) {
|
||||
if (ssh->ctx->channelCloseCb) {
|
||||
ssh->ctx->channelCloseCb(channel, ssh->channelCloseCtx);
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == WS_SUCCESS) {
|
||||
if (!channel->closeTxd) {
|
||||
ret = SendChannelClose(ssh, channel->peerChannel);
|
||||
|
|
Loading…
Reference in New Issue