use XSTRNCMP and remove debug code used during devel

pull/61/head
Jacob Barthelmeh 2018-06-01 09:40:57 -06:00
parent b467a3073c
commit 0194784e6d
2 changed files with 1 additions and 16 deletions

View File

@ -191,7 +191,7 @@ static THREAD_RETURN WOLFSSH_THREAD server_worker(void* vArgs)
/* handle if is SFTP channel */
if (WOLFSSH_SESSION_SUBSYSTEM == wolfSSH_GetSessionType(threadCtx->ssh)
&& (WMEMCMP(cmd, "sftp", sizeof("sftp")) == 0)) {
&& (XSTRNCMP(cmd, "sftp", sizeof("sftp")) == 0)) {
#ifdef WOLFSSH_SFTP
ret = sftp_worker(threadCtx);
#else

View File

@ -640,13 +640,6 @@ int wolfSSH_TriggerKeyExchange(WOLFSSH* ssh)
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)
{
@ -700,10 +693,6 @@ int wolfSSH_stream_read(WOLFSSH* ssh, byte* buf, word32 bufSz)
inputBuffer->length = usedSz;
inputBuffer->idx = 0;
}
#if 0
printf("Read : ");
DumpBuf(buf, bufSz);
#endif
WLOG(WS_LOG_DEBUG, "Leaving wolfSSH_stream_read(), rxd = %d", 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)
return WS_BAD_ARGUMENT;
#if 0
printf("Send : ");
DumpBuf(buf, bufSz);
#endif
bytesTxd = SendChannelData(ssh, ssh->channelList->peerChannel, buf, bufSz);
WLOG(WS_LOG_DEBUG, "Leaving wolfSSH_stream_send(), txd = %d", bytesTxd);