| 586 |
case IdNamedPipe: |
case IdNamedPipe: |
| 587 |
InitFileIO(IdNamedPipe); /* TTPLUG */ |
InitFileIO(IdNamedPipe); /* TTPLUG */ |
| 588 |
TTXOpenFile(); /* TTPLUG */ |
TTXOpenFile(); /* TTPLUG */ |
| 589 |
|
|
| 590 |
memset(P, 0, sizeof(P)); |
memset(P, 0, sizeof(P)); |
| 591 |
strncpy_s(P, sizeof(P), ts->HostName, _TRUNCATE); |
strncpy_s(P, sizeof(P), ts->HostName, _TRUNCATE); |
| 592 |
|
|
| 594 |
if (CheckNamedPipeFormat(P, strlen(P)) < 0) { |
if (CheckNamedPipeFormat(P, strlen(P)) < 0) { |
| 595 |
InvalidHost = TRUE; |
InvalidHost = TRUE; |
| 596 |
|
|
| 597 |
_snprintf_s(ErrMsg, sizeof(ErrMsg), _TRUNCATE, |
_snprintf_s(ErrMsg, sizeof(ErrMsg), _TRUNCATE, |
| 598 |
"Invalid pipe name (%d)\n\n" |
"Invalid pipe name (%d)\n\n" |
| 599 |
"A valid pipe name has the form\n" |
"A valid pipe name has the form\n" |
| 600 |
"\"\\\\<ServerName>\\pipe\\<PipeName>\"", |
"\"\\\\<ServerName>\\pipe\\<PipeName>\"", |
| 601 |
GetLastError()); |
GetLastError()); |
| 602 |
get_lang_msg("MSG_TT_ERROR", uimsg, sizeof(uimsg), "Tera Term: Error", ts->UILanguageFile); |
get_lang_msg("MSG_TT_ERROR", uimsg, sizeof(uimsg), "Tera Term: Error", ts->UILanguageFile); |
| 603 |
MessageBox(cv->HWin,ErrMsg,uimsg,MB_TASKMODAL | MB_ICONEXCLAMATION); |
MessageBox(cv->HWin,ErrMsg,uimsg,MB_TASKMODAL | MB_ICONEXCLAMATION); |
| 675 |
WaitForSingleObject(REnd,INFINITE); |
WaitForSingleObject(REnd,INFINITE); |
| 676 |
} |
} |
| 677 |
else { |
else { |
| 678 |
DErr = GetLastError(); |
DErr = GetLastError(); |
| 679 |
// [VMware] this returns 109 (broken pipe) if a named pipe is removed. |
// [VMware] this returns 109 (broken pipe) if a named pipe is removed. |
| 680 |
// [Virtual Box] this returns 233 (pipe not connected) if a named pipe is removed. |
// [Virtual Box] this returns 233 (pipe not connected) if a named pipe is removed. |
| 681 |
if (! cv->Ready || ERROR_BROKEN_PIPE == DErr || ERROR_PIPE_NOT_CONNECTED == DErr) { |
if (! cv->Ready || ERROR_BROKEN_PIPE == DErr || ERROR_PIPE_NOT_CONNECTED == DErr) { |
| 1089 |
DWORD DErr; |
DWORD DErr; |
| 1090 |
|
|
| 1091 |
if ((! cv->Open) || (! cv->Ready)) { |
if ((! cv->Open) || (! cv->Ready)) { |
| 1092 |
cv->OutBuffCount = 0; |
cv->OutBuffCount = 0; |
| 1093 |
return; |
return; |
| 1094 |
} |
} |
| 1095 |
|
|