switch SCP_USER_CALLBACKS to WOLFSSH_SCP_USER_CALLBACKS

pull/56/head
Chris Conlon 2018-05-02 10:30:02 -06:00
parent 62d00eeaf9
commit 2151229eb4
5 changed files with 9 additions and 8 deletions

View File

@ -368,7 +368,7 @@ WOLFSSH* SshInit(WOLFSSH* ssh, WOLFSSH_CTX* ctx)
ssh->scpConfirmMsg = NULL;
ssh->scpConfirmMsgSz = 0;
ssh->scpRecvCtx = NULL;
#if !defined(SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
#if !defined(WOLFSSH_SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
ssh->scpSendCtx = &(ssh->scpSendCbCtx);
#else
ssh->scpSendCtx = NULL;

View File

@ -45,7 +45,7 @@
#include "src/misc.c"
#endif
#if defined(NO_FILESYSTEM) && !defined(SCP_USER_CALLBACKS)
#if defined(NO_FILESYSTEM) && !defined(WOLFSSH_SCP_USER_CALLBACKS)
#error "scp with no filesystem requires user callbacks"
#endif
@ -1338,7 +1338,7 @@ void* wolfSSH_GetScpSendCtx(WOLFSSH* ssh)
}
#if !defined(SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
#if !defined(WOLFSSH_SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
/* for porting to systems without errno */
static INLINE int wolfSSH_LastError(void)
@ -1986,7 +1986,7 @@ int wsScpSendCallback(WOLFSSH* ssh, int state, const char* peerRequest,
return ret;
}
#endif /* SCP_USER_CALLBACKS */
#endif /* WOLFSSH_SCP_USER_CALLBACKS */
#endif /* WOLFSSH_SCP */

View File

@ -289,7 +289,7 @@ struct WOLFSSH {
word32 scpBufferedSz; /* bytes buffered to send to peer */
void* scpRecvCtx; /* SCP receive callback context handle */
void* scpSendCtx; /* SCP send callback context handle */
#if !defined(SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
#if !defined(WOLFSSH_SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
ScpSendCtx scpSendCbCtx; /* used in default case to for send cb ctx */
#endif
#endif

View File

@ -58,7 +58,8 @@ extern "C" {
#define WREWIND(s) rewind((s))
#define WSEEK_END SEEK_END
#if defined(WOLFSSH_SCP) && !defined(SCP_USER_CALLBACKS)
#if defined(WOLFSSH_SCP) && !defined(WOLFSSH_SCP_USER_CALLBACKS) && \
!defined(NO_FILESYSTEM)
/* for chdir() */
#include <unistd.h>
/* for mkdir() */

View File

@ -51,7 +51,7 @@ extern "C" {
#define DEFAULT_SCP_BUFFER_SZ DEFAULT_MAX_PACKET_SZ
#endif
#if !defined(SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
#if !defined(WOLFSSH_SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
/* for utimes() */
#include <sys/time.h>
#include <errno.h>
@ -69,7 +69,7 @@ extern "C" {
struct ScpDir* next; /* previous directory in stack */
} ScpDir;
#endif /* SCP_USER_CALLBACKS */
#endif /* WOLFSSH_SCP_USER_CALLBACKS */
enum WS_ScpFileStates {
/* sink */