mirror of https://github.com/wolfSSL/wolfssh.git
use XSTRNCMP and remove debug code used during devel
parent
b467a3073c
commit
0194784e6d
|
@ -191,7 +191,7 @@ static THREAD_RETURN WOLFSSH_THREAD server_worker(void* vArgs)
|
||||||
|
|
||||||
/* handle if is SFTP channel */
|
/* handle if is SFTP channel */
|
||||||
if (WOLFSSH_SESSION_SUBSYSTEM == wolfSSH_GetSessionType(threadCtx->ssh)
|
if (WOLFSSH_SESSION_SUBSYSTEM == wolfSSH_GetSessionType(threadCtx->ssh)
|
||||||
&& (WMEMCMP(cmd, "sftp", sizeof("sftp")) == 0)) {
|
&& (XSTRNCMP(cmd, "sftp", sizeof("sftp")) == 0)) {
|
||||||
#ifdef WOLFSSH_SFTP
|
#ifdef WOLFSSH_SFTP
|
||||||
ret = sftp_worker(threadCtx);
|
ret = sftp_worker(threadCtx);
|
||||||
#else
|
#else
|
||||||
|
|
15
src/ssh.c
15
src/ssh.c
|
@ -640,13 +640,6 @@ int wolfSSH_TriggerKeyExchange(WOLFSSH* ssh)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void DumpBuf(byte* buf, word32 bufSz) {
|
|
||||||
word32 i;
|
|
||||||
for (i = 0; i < bufSz; i++) printf("%02X", buf[i]);
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int wolfSSH_stream_read(WOLFSSH* ssh, byte* buf, word32 bufSz)
|
int wolfSSH_stream_read(WOLFSSH* ssh, byte* buf, word32 bufSz)
|
||||||
{
|
{
|
||||||
|
@ -700,10 +693,6 @@ int wolfSSH_stream_read(WOLFSSH* ssh, byte* buf, word32 bufSz)
|
||||||
inputBuffer->length = usedSz;
|
inputBuffer->length = usedSz;
|
||||||
inputBuffer->idx = 0;
|
inputBuffer->idx = 0;
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
printf("Read : ");
|
|
||||||
DumpBuf(buf, bufSz);
|
|
||||||
#endif
|
|
||||||
WLOG(WS_LOG_DEBUG, "Leaving wolfSSH_stream_read(), rxd = %d", bufSz);
|
WLOG(WS_LOG_DEBUG, "Leaving wolfSSH_stream_read(), rxd = %d", bufSz);
|
||||||
return bufSz;
|
return bufSz;
|
||||||
}
|
}
|
||||||
|
@ -717,10 +706,6 @@ int wolfSSH_stream_send(WOLFSSH* ssh, byte* buf, word32 bufSz)
|
||||||
|
|
||||||
if (ssh == NULL || buf == NULL || ssh->channelList == NULL)
|
if (ssh == NULL || buf == NULL || ssh->channelList == NULL)
|
||||||
return WS_BAD_ARGUMENT;
|
return WS_BAD_ARGUMENT;
|
||||||
#if 0
|
|
||||||
printf("Send : ");
|
|
||||||
DumpBuf(buf, bufSz);
|
|
||||||
#endif
|
|
||||||
bytesTxd = SendChannelData(ssh, ssh->channelList->peerChannel, buf, bufSz);
|
bytesTxd = SendChannelData(ssh, ssh->channelList->peerChannel, buf, bufSz);
|
||||||
|
|
||||||
WLOG(WS_LOG_DEBUG, "Leaving wolfSSH_stream_send(), txd = %d", bytesTxd);
|
WLOG(WS_LOG_DEBUG, "Leaving wolfSSH_stream_send(), txd = %d", bytesTxd);
|
||||||
|
|
Loading…
Reference in New Issue