~werner-jaeger/l2tp-ipsec-vpn/gui

« back to all changes in this revision

Viewing changes to src/VPNControlTask.cpp

  • Committer: wejaeger
  • Date: 2012-04-24 06:04:01 UTC
  • Revision ID: svn-v4:b6315ce2-5a64-4426-9aac-a11868b78efd:trunk:132
provided a separate error status icon

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
static const char* const STR_LOG_MATCH_AUTHFAILED("LCP terminated by peer (Authentication failed)");
58
58
static const char* const STR_LOG_MATCH_NO_DATA("No data from BIO_read");
59
59
static const char* const STR_LOG_MATCH_PEERAUTHFAILED("but I couldn't find any suitable secret (password) for it to use to do so.");
 
60
static const char* const STR_CONNECT_TIMEOUT("(Timeout)");
60
61
 
61
62
static const int ERR_INTERRUPTED(98);
62
63
static const int ERR_CONNECTING_TO_CONTROL_DAEMON(99);
66
67
static const int ERR_AUTHENTICATION_FAILED(404);
67
68
static const int ERR_WRONG_CERTIFICATE(405);
68
69
static const int ERR_NO_SECRET_FOUND(406);
 
70
static const int ERR_CONNECT_TIMEOUT(410);
69
71
 
70
72
QFile VPNControlTask::m_vpnLogPipe(strVpnLogPipeName);
71
73
 
337
339
         m_iReturnCode = ERR_NO_SECRET_FOUND;
338
340
         emitErrorMsg(connectionName());
339
341
      }
 
342
      else if (::strstr(data, STR_CONNECT_TIMEOUT))
 
343
      {
 
344
         m_iReturnCode = ERR_CONNECT_TIMEOUT;
 
345
         emitErrorMsg(connectionName());
 
346
      }
340
347
      else if (!m_fIPSecConnectionAdded)
341
348
      {
342
349
         m_fIPSecConnectionAdded = strLine.contains(STR_LOG_MATCH_IPSEC_CONNECTIONADDED + "\"" + connectionName() + "\"");
487
494
         *m_pErrorStream << "No secret found to authenticate  '" << strErrorContext << "'";
488
495
         break;
489
496
 
 
497
      case ERR_CONNECT_TIMEOUT:
 
498
         *m_pErrorStream << "Connection attempt to '" << strErrorContext << "' timed out";
 
499
         break;
 
500
 
490
501
      default:
491
502
         *m_pErrorStream << "Command '" << strErrorContext << "' failed and exited with given error code";
492
503
         break;