| 735 |
_S_IREAD | _S_IWRITE); |
_S_IREAD | _S_IWRITE); |
| 736 |
|
|
| 737 |
if (file >= 0) { |
if (file >= 0) { |
| 738 |
|
time_t now = time(NULL); |
| 739 |
|
char tmp[26]; |
| 740 |
|
DWORD processid; |
| 741 |
|
strcpy_s(tmp, sizeof(tmp), _strdup(ctime(&now))); |
| 742 |
|
tmp[strlen(tmp)-1]= 0; // delete "\n" |
| 743 |
|
_write(file, tmp, strlen(tmp)); |
| 744 |
|
GetWindowThreadProcessId(pvar->cv->HWin, &processid); |
| 745 |
|
_snprintf_s(tmp, sizeof(tmp), _TRUNCATE, " [%lu] ",processid); |
| 746 |
|
_write(file, tmp, strlen(tmp)); |
| 747 |
_write(file, msg, strlen(msg)); |
_write(file, msg, strlen(msg)); |
| 748 |
_write(file, "\n", 1); |
_write(file, "\n", 1); |
| 749 |
_close(file); |
_close(file); |
| 754 |
static void PASCAL FAR TTXOpenTCP(TTXSockHooks FAR * hooks) |
static void PASCAL FAR TTXOpenTCP(TTXSockHooks FAR * hooks) |
| 755 |
{ |
{ |
| 756 |
if (pvar->settings.Enabled) { |
if (pvar->settings.Enabled) { |
|
char buf[1024] = "\n---------------------------------------------------------------------\nInitiating SSH session at "; |
|
|
struct tm FAR *newtime; |
|
|
time_t long_time; |
|
|
|
|
| 757 |
// TCPLocalEcho/TCPCRSend を無効にする (maya 2007.4.25) |
// TCPLocalEcho/TCPCRSend を無効にする (maya 2007.4.25) |
| 758 |
pvar->ts->DisableTCPEchoCR = TRUE; |
pvar->ts->DisableTCPEchoCR = TRUE; |
| 759 |
|
|
| 760 |
pvar->session_settings = pvar->settings; |
pvar->session_settings = pvar->settings; |
| 761 |
|
|
| 762 |
time(&long_time); |
notify_verbose_message(pvar, "---------------------------------------------------------------------", LOG_LEVEL_VERBOSE); |
| 763 |
newtime = localtime(&long_time); |
notify_verbose_message(pvar, "Initiating SSH session", LOG_LEVEL_VERBOSE); |
|
strncat_s(buf, sizeof(buf), asctime(newtime), _TRUNCATE); |
|
|
notify_verbose_message(pvar, buf, LOG_LEVEL_VERBOSE); |
|
| 764 |
|
|
| 765 |
FWDUI_load_settings(pvar); |
FWDUI_load_settings(pvar); |
| 766 |
|
|