[FIX] plugin_outlook: Removed method check_connectivity as it is removed from server in a commit at rev: openobject-server/saas-1/revision/4842 and fixed the issue faced when login using SSL and recompiled the plugin: (Maintenance Case : 596114)
bzr revid: rgo@tinyerp.com-20130920085123-j622oabndu1zjisy
This commit is contained in:
parent
546a191f0a
commit
25d1081a1e
|
@ -377,20 +377,6 @@ namespace OpenERPClient
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool check_connectivity()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
It will check connection on given server url.
|
|
||||||
|
|
||||||
:return : True or False.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.Open(OpenERPClient.OpenERPService.Common);
|
|
||||||
bool flag = this.rpcclient.check_connectivity();
|
|
||||||
this.Close();
|
|
||||||
return flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,10 +47,6 @@ namespace OpenERPClient
|
||||||
[XmlRpcMethod("server_version")]
|
[XmlRpcMethod("server_version")]
|
||||||
string ServerVersion();
|
string ServerVersion();
|
||||||
|
|
||||||
[XmlRpcMethod("check_connectivity")]
|
|
||||||
bool check_connectivity();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public interface Ixmlrpcconnect : IOpenERPCommon, IOpenERPDB, IOpenERPObject
|
public interface Ixmlrpcconnect : IOpenERPCommon, IOpenERPDB, IOpenERPObject
|
||||||
{
|
{
|
||||||
|
@ -84,11 +80,6 @@ namespace OpenERPClient
|
||||||
{
|
{
|
||||||
return rpcclient.ServerVersion();
|
return rpcclient.ServerVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool check_connectivity()
|
|
||||||
{
|
|
||||||
return rpcclient.check_connectivity();
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
this.chkSSL.TabIndex = 19;
|
this.chkSSL.TabIndex = 19;
|
||||||
this.chkSSL.Text = "SSL (https)";
|
this.chkSSL.Text = "SSL (https)";
|
||||||
this.chkSSL.UseVisualStyleBackColor = true;
|
this.chkSSL.UseVisualStyleBackColor = true;
|
||||||
|
this.chkSSL.CheckedChanged += new System.EventHandler(this.chkSSL_CheckedChanged);
|
||||||
//
|
//
|
||||||
// txt_server_port
|
// txt_server_port
|
||||||
//
|
//
|
||||||
|
|
|
@ -20,6 +20,13 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using OpenERPClient;
|
using OpenERPClient;
|
||||||
|
using System.Net;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Security;
|
||||||
|
using System.Net;
|
||||||
|
using System.Security.Cryptography.X509Certificates;
|
||||||
|
using System.Net.Security;
|
||||||
|
|
||||||
namespace OpenERPOutlookPlugin
|
namespace OpenERPOutlookPlugin
|
||||||
{
|
{
|
||||||
|
@ -50,6 +57,15 @@ namespace OpenERPOutlookPlugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool ValidateServerCertificate(
|
||||||
|
object sender,
|
||||||
|
X509Certificate certificate,
|
||||||
|
X509Chain chain,
|
||||||
|
SslPolicyErrors sslPolicyErrors)
|
||||||
|
{
|
||||||
|
// Somehow the cert always has PolicyErrors so I am returning true regardless.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private void btn_server_ok_Click(object sender, EventArgs e)
|
private void btn_server_ok_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -59,7 +75,10 @@ namespace OpenERPOutlookPlugin
|
||||||
OpenERPConnect openerp_connect = openerp_outlook.Connection;
|
OpenERPConnect openerp_connect = openerp_outlook.Connection;
|
||||||
string url = Tools.JoinURL(this.txt_server_host.Text, this.txt_server_port.Text, this.chkSSL.Checked);
|
string url = Tools.JoinURL(this.txt_server_host.Text, this.txt_server_port.Text, this.chkSSL.Checked);
|
||||||
this.txtServerURL.Text = url;
|
this.txtServerURL.Text = url;
|
||||||
openerp_connect.check_connectivity();
|
if (this.chkSSL.Checked)
|
||||||
|
{
|
||||||
|
ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(ValidateServerCertificate);
|
||||||
|
}
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -74,6 +93,16 @@ namespace OpenERPOutlookPlugin
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void chkSSL_CheckedChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (this.chkSSL.Checked)
|
||||||
|
{
|
||||||
|
txt_server_port.Text = "443";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
txt_server_port.Text = "8069";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue