X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fforms%2Fnewaccount%2FfrmNewAccount.cpp;h=fc1ae8afb1ce607214037974365fc18f518cda32;hb=7ac592fd401bd3a5e8c346827c63b34899a17e64;hp=ec9aa1b6d787dcb7af8cada51007e2933347b7bb;hpb=28f3ef896d323eb07dbc74bfb6e71c364295105a;p=xestiacalendar%2F.git diff --git a/source/forms/newaccount/frmNewAccount.cpp b/source/forms/newaccount/frmNewAccount.cpp index ec9aa1b..fc1ae8a 100644 --- a/source/forms/newaccount/frmNewAccount.cpp +++ b/source/forms/newaccount/frmNewAccount.cpp @@ -410,7 +410,7 @@ void frmNewAccount::RunCalDAVTest( wxCommandEvent &event ) connData.port = wxAtoi(txtServerPort->GetValue()); connData.username = txtUsername->GetValue().ToStdString(); connData.password = txtPassword->GetValue().ToStdString(); - connData.useSSL = chkUseSSL->GetValue() ? true : false); + connData.useSSL = chkUseSSL->GetValue() ? true : false; CalDAV testConnection; testConnection.SetupConnectionData(&connData); @@ -423,8 +423,8 @@ void frmNewAccount::RunCalDAVTest( wxCommandEvent &event ) // Test the connection. - testConnection.SetupConnectionObject(); - CalDAVServerResult testConnectionResult = testConnection.Connect(false); + //testConnection.SetupConnectionObject(); + CalDAVServerResult testConnectionResult = testConnection.Connect(); // If server is using SSL, verify that the SSL connection is valid. @@ -509,14 +509,14 @@ void frmNewAccount::RunCalDAVTest( wxCommandEvent &event ) testConnection.BypassSSLVerification(true); - CalDAVServerResult testConnectionResult = testConnection.Connect(false); + CalDAVServerResult testConnectionResult = testConnection.Connect(); testConnection.BypassSSLVerification(false); SSLCertCollectionString certData = testConnection.BuildSSLCollection(); frmInvalidSSLCertificate *frmICPtr = new frmInvalidSSLCertificate(this); - frmICPtr->LoadDataNew(CertData, txtServerAddress->GetValue().ToStdString()); + frmICPtr->LoadDataNew(certData, txtServerAddress->GetValue().ToStdString()); frmICPtr->ShowModal(); int sslResult = frmICPtr->GetResult(); @@ -535,7 +535,7 @@ void frmNewAccount::RunCalDAVTest( wxCommandEvent &event ) usingSSLBypass = true; testConnection.BypassSSLVerification(true); - CalDAVServerResult testConnectionResult = testConnection.Connect(true); + CalDAVServerResult testConnectionResult = testConnection.Connect(); testConnection.BypassSSLVerification(false); @@ -546,17 +546,17 @@ void frmNewAccount::RunCalDAVTest( wxCommandEvent &event ) // TODO: Integrate into the code. //lblConnectionResultText->SetLabel(_("An error occured whilst connnecting: ") + CardDAVConn.GetErrorMessage() + wxString::Format(wxT(" (%i)\n%s"), sslcode, CardDAVConn.GetErrorBuffer().mb_str())); - + } #endif } - testConnectionResult = testConnection.Connect(true); + testConnectionResult = testConnection.Connect(); // Get the server prefix if the connection was successful. - if (testConnectionResult == COCONNECT_OK){ + if (testConnectionResult.result == CALDAVQUERYRESULT_OK){ if (usingSSLBypass == true){ testConnection.BypassSSLVerification(true); @@ -573,14 +573,14 @@ void frmNewAccount::RunCalDAVTest( wxCommandEvent &event ) } - testConnectionResult == COCONNECT_OK ? resultData->Connected = true : resultData->Connected = false; + testConnectionResult.result == CALDAVQUERYRESULT_OK ? resultData->Connected = true : resultData->Connected = false; - resultData->SSLStatus = TestConnection.CanDoSSL(); - resultData->SSLVerified = TestConnection.SSLVerify(); - resultData->ValidResponse = TestConnection.HasValidResponse(); - resultData->AuthPassed = TestConnection.AbleToLogin(); - resultData->CanProcess = TestConnection.CanDoProcessing(); - resultData->ErrorMessage = TestConnection.GetErrorMessage(); + resultData->SSLStatus = testConnection.CanDoSSL(); + resultData->SSLVerified = testConnection.SSLVerify(); + resultData->ValidResponse = testConnection.HasValidResponse(); + resultData->AuthPassed = testConnection.AbleToLogin(); + resultData->CanProcess = testConnection.CanDoProcessing(); + resultData->ErrorMessage = testConnection.GetErrorMessage(); // Post event back confirming the tests.