mirror of https://github.com/wolfSSL/wolfssh.git
commit
c07a86856e
|
@ -57,6 +57,8 @@ static int ScpPushDir(void *fs, ScpSendCtx* ctx, const char* path, void* heap);
|
||||||
static int ScpPopDir(void *fs, ScpSendCtx* ctx, void* heap);
|
static int ScpPopDir(void *fs, ScpSendCtx* ctx, void* heap);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define WOLFSSH_MODE_MASK 0777
|
||||||
|
|
||||||
const char scpError[] = "scp error: %s, %d";
|
const char scpError[] = "scp error: %s, %d";
|
||||||
const char scpState[] = "scp state: %s";
|
const char scpState[] = "scp state: %s";
|
||||||
|
|
||||||
|
@ -315,7 +317,8 @@ static int SendScpFileHeader(WOLFSSH* ssh)
|
||||||
#ifndef WSCPFILEHDR
|
#ifndef WSCPFILEHDR
|
||||||
WMEMSET(buf, 0, sizeof(buf));
|
WMEMSET(buf, 0, sizeof(buf));
|
||||||
WSNPRINTF(buf, sizeof(buf), "C%04o %u %s\n",
|
WSNPRINTF(buf, sizeof(buf), "C%04o %u %s\n",
|
||||||
ssh->scpFileMode, ssh->scpFileSz, ssh->scpFileName);
|
ssh->scpFileMode & WOLFSSH_MODE_MASK,
|
||||||
|
ssh->scpFileSz, ssh->scpFileName);
|
||||||
filehdr = buf;
|
filehdr = buf;
|
||||||
#else
|
#else
|
||||||
filehdr = WSCPFILEHDR(ssh);
|
filehdr = WSCPFILEHDR(ssh);
|
||||||
|
@ -350,8 +353,9 @@ static int SendScpEnterDirectory(WOLFSSH* ssh)
|
||||||
|
|
||||||
WMEMSET(buf, 0, sizeof(buf));
|
WMEMSET(buf, 0, sizeof(buf));
|
||||||
|
|
||||||
WSNPRINTF(buf, sizeof(buf), "D%04o 0 %s\n", ssh->scpFileMode,
|
WSNPRINTF(buf, sizeof(buf), "D%04o 0 %s\n",
|
||||||
ssh->scpFileName);
|
ssh->scpFileMode & WOLFSSH_MODE_MASK,
|
||||||
|
ssh->scpFileName);
|
||||||
|
|
||||||
bufSz = (int)WSTRLEN(buf);
|
bufSz = (int)WSTRLEN(buf);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue