mirror of https://github.com/wolfSSL/wolfssh.git
switch SCP_USER_CALLBACKS to WOLFSSH_SCP_USER_CALLBACKS
parent
62d00eeaf9
commit
2151229eb4
|
@ -368,7 +368,7 @@ WOLFSSH* SshInit(WOLFSSH* ssh, WOLFSSH_CTX* ctx)
|
||||||
ssh->scpConfirmMsg = NULL;
|
ssh->scpConfirmMsg = NULL;
|
||||||
ssh->scpConfirmMsgSz = 0;
|
ssh->scpConfirmMsgSz = 0;
|
||||||
ssh->scpRecvCtx = NULL;
|
ssh->scpRecvCtx = NULL;
|
||||||
#if !defined(SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
|
#if !defined(WOLFSSH_SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
|
||||||
ssh->scpSendCtx = &(ssh->scpSendCbCtx);
|
ssh->scpSendCtx = &(ssh->scpSendCbCtx);
|
||||||
#else
|
#else
|
||||||
ssh->scpSendCtx = NULL;
|
ssh->scpSendCtx = NULL;
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#include "src/misc.c"
|
#include "src/misc.c"
|
||||||
#endif
|
#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"
|
#error "scp with no filesystem requires user callbacks"
|
||||||
#endif
|
#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 */
|
/* for porting to systems without errno */
|
||||||
static INLINE int wolfSSH_LastError(void)
|
static INLINE int wolfSSH_LastError(void)
|
||||||
|
@ -1986,7 +1986,7 @@ int wsScpSendCallback(WOLFSSH* ssh, int state, const char* peerRequest,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SCP_USER_CALLBACKS */
|
#endif /* WOLFSSH_SCP_USER_CALLBACKS */
|
||||||
|
|
||||||
#endif /* WOLFSSH_SCP */
|
#endif /* WOLFSSH_SCP */
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@ struct WOLFSSH {
|
||||||
word32 scpBufferedSz; /* bytes buffered to send to peer */
|
word32 scpBufferedSz; /* bytes buffered to send to peer */
|
||||||
void* scpRecvCtx; /* SCP receive callback context handle */
|
void* scpRecvCtx; /* SCP receive callback context handle */
|
||||||
void* scpSendCtx; /* SCP send 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 */
|
ScpSendCtx scpSendCbCtx; /* used in default case to for send cb ctx */
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -58,7 +58,8 @@ extern "C" {
|
||||||
#define WREWIND(s) rewind((s))
|
#define WREWIND(s) rewind((s))
|
||||||
#define WSEEK_END SEEK_END
|
#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() */
|
/* for chdir() */
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
/* for mkdir() */
|
/* for mkdir() */
|
||||||
|
|
|
@ -51,7 +51,7 @@ extern "C" {
|
||||||
#define DEFAULT_SCP_BUFFER_SZ DEFAULT_MAX_PACKET_SZ
|
#define DEFAULT_SCP_BUFFER_SZ DEFAULT_MAX_PACKET_SZ
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
|
#if !defined(WOLFSSH_SCP_USER_CALLBACKS) && !defined(NO_FILESYSTEM)
|
||||||
/* for utimes() */
|
/* for utimes() */
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
@ -69,7 +69,7 @@ extern "C" {
|
||||||
struct ScpDir* next; /* previous directory in stack */
|
struct ScpDir* next; /* previous directory in stack */
|
||||||
} ScpDir;
|
} ScpDir;
|
||||||
|
|
||||||
#endif /* SCP_USER_CALLBACKS */
|
#endif /* WOLFSSH_SCP_USER_CALLBACKS */
|
||||||
|
|
||||||
enum WS_ScpFileStates {
|
enum WS_ScpFileStates {
|
||||||
/* sink */
|
/* sink */
|
||||||
|
|
Loading…
Reference in New Issue