Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/ttcomtester/teraterm/teraterm/commlib.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6434 by yutakapon, Mon Feb 1 15:14:14 2016 UTC revision 6435 by doda, Mon Jul 11 08:53:02 2016 UTC
# Line 586  void CommOpen(HWND HW, PTTSet ts, PComVa Line 586  void CommOpen(HWND HW, PTTSet ts, PComVa
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    
# Line 594  void CommOpen(HWND HW, PTTSet ts, PComVa Line 594  void CommOpen(HWND HW, PTTSet ts, PComVa
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);
# Line 675  void NamedPipeThread(void *arg) Line 675  void NamedPipeThread(void *arg)
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) {
# Line 1089  void CommSend(PComVar cv) Line 1089  void CommSend(PComVar cv)
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    

Legend:
Removed from v.6434  
changed lines
  Added in v.6435

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26