Browse Subversion Repository
Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/ssh.c
Parent Directory
| Revision Log
| Patch
| 54 |
#include <assert.h> |
#include <assert.h> |
| 55 |
|
|
| 56 |
#include <direct.h> |
#include <direct.h> |
| 57 |
|
#include <io.h> |
| 58 |
|
|
| 59 |
// SSH2 macro |
// SSH2 macro |
| 60 |
#ifdef _DEBUG |
#ifdef _DEBUG |
| 3443 |
ExtractFileName(dstfile, c->scp.localfile, sizeof(c->scp.localfile)); // file name only |
ExtractFileName(dstfile, c->scp.localfile, sizeof(c->scp.localfile)); // file name only |
| 3444 |
} |
} |
| 3445 |
|
|
| 3446 |
|
if (_access(c->scp.localfilefull, 0x00) == 0) { |
| 3447 |
|
char buf[80]; |
| 3448 |
|
_snprintf_s(buf, sizeof(buf), _TRUNCATE, "`%s' file exists. (%d)", c->scp.localfilefull, GetLastError()); |
| 3449 |
|
MessageBox(NULL, buf, "TTSSH: file error", MB_OK | MB_ICONERROR); |
| 3450 |
|
goto error; |
| 3451 |
|
} |
| 3452 |
|
|
| 3453 |
fp = fopen(c->scp.localfilefull, "wb"); |
fp = fopen(c->scp.localfilefull, "wb"); |
| 3454 |
if (fp == NULL) { |
if (fp == NULL) { |
| 3455 |
char buf[80]; |
char buf[80]; |
| 3495 |
int SSH_start_scp(PTInstVar pvar, char *sendfile, char *dstfile) |
int SSH_start_scp(PTInstVar pvar, char *sendfile, char *dstfile) |
| 3496 |
{ |
{ |
| 3497 |
return SSH_scp_transaction(pvar, sendfile, dstfile, TOLOCAL); |
return SSH_scp_transaction(pvar, sendfile, dstfile, TOLOCAL); |
| 3498 |
|
} |
| 3499 |
|
|
| 3500 |
#if 0 |
int SSH_start_scp_receive(PTInstVar pvar, char *filename) |
| 3501 |
//return SSH_scp_transaction(pvar, "bigfile30.dat", FROMREMOTE); |
{ |
| 3502 |
#endif |
return SSH_scp_transaction(pvar, filename, NULL, FROMREMOTE); |
| 3503 |
} |
} |
| 3504 |
|
|
| 3505 |
|
|
|
|
Legend:
| Removed from v.3096 |
|
| changed lines |
| |
Added in v.3102 |
|
|
| |