summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2011-03-11 23:09:59 +0100
committerJose <jose@zeroc.com>2011-03-11 23:09:59 +0100
commit064bfd110179c1f7ba4fe24ff9c5a2752cfe0dc1 (patch)
treeb6a80d32dde481b07b80a505d48d03424835c92c
parent4943 - ant 1.8.x warning (diff)
downloadice-064bfd110179c1f7ba4fe24ff9c5a2752cfe0dc1.tar.bz2
ice-064bfd110179c1f7ba4fe24ff9c5a2752cfe0dc1.tar.xz
ice-064bfd110179c1f7ba4fe24ff9c5a2752cfe0dc1.zip
4766 - icepatch2client doesn't support indirect proxy
-rw-r--r--config/PropertyNames.xml4
-rw-r--r--cpp/src/Ice/PropertyNames.cpp13
-rw-r--r--cpp/src/Ice/PropertyNames.h3
-rwxr-xr-xcpp/src/IcePatch2Lib/ClientUtil.cpp30
-rw-r--r--cs/src/Ice/PropertyNames.cs10
-rw-r--r--java/src/IceInternal/PropertyNames.java10
6 files changed, 56 insertions, 14 deletions
diff --git a/config/PropertyNames.xml b/config/PropertyNames.xml
index 5e931ef3d2d..3b0dc3bf10e 100644
--- a/config/PropertyNames.xml
+++ b/config/PropertyNames.xml
@@ -471,6 +471,10 @@ generated from the section label.
<property name="Remove" />
<property name="Thorough" />
</section>
+
+ <section name="IcePatch2Client">
+ <property name="Proxy" />
+ </section>
<section name="IceSSL">
<property name="Alias" />
diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp
index dfd88de867d..9310e6db4e6 100644
--- a/cpp/src/Ice/PropertyNames.cpp
+++ b/cpp/src/Ice/PropertyNames.cpp
@@ -8,7 +8,7 @@
// **********************************************************************
//
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Fri May 28 11:55:01 2010
+// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Mar 7 23:28:12 2011
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -442,6 +442,15 @@ const IceInternal::PropertyArray
IceInternal::PropertyNames::IcePatch2Props(IcePatch2PropsData,
sizeof(IcePatch2PropsData)/sizeof(IcePatch2PropsData[0]));
+const IceInternal::Property IcePatch2ClientPropsData[] =
+{
+ IceInternal::Property("IcePatch2Client.Proxy", false, 0),
+};
+
+const IceInternal::PropertyArray
+ IceInternal::PropertyNames::IcePatch2ClientProps(IcePatch2ClientPropsData,
+ sizeof(IcePatch2ClientPropsData)/sizeof(IcePatch2ClientPropsData[0]));
+
const IceInternal::Property IceSSLPropsData[] =
{
IceInternal::Property("IceSSL.Alias", false, 0),
@@ -649,6 +658,7 @@ const IceInternal::PropertyArray IceInternal::PropertyNames::validProps[] =
IceGridAdminProps,
IceGridProps,
IcePatch2Props,
+ IcePatch2ClientProps,
IceSSLProps,
IceStormAdminProps,
Glacier2Props,
@@ -665,6 +675,7 @@ const char* IceInternal::PropertyNames::clPropNames[] =
"IceGridAdmin",
"IceGrid",
"IcePatch2",
+ "IcePatch2Client",
"IceSSL",
"IceStormAdmin",
"Glacier2",
diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h
index 75f13bcb87f..63fa5199607 100644
--- a/cpp/src/Ice/PropertyNames.h
+++ b/cpp/src/Ice/PropertyNames.h
@@ -8,7 +8,7 @@
// **********************************************************************
//
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Fri May 28 11:55:01 2010
+// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Mar 7 23:28:12 2011
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -64,6 +64,7 @@ public:
static const PropertyArray IceGridAdminProps;
static const PropertyArray IceGridProps;
static const PropertyArray IcePatch2Props;
+ static const PropertyArray IcePatch2ClientProps;
static const PropertyArray IceSSLProps;
static const PropertyArray IceStormAdminProps;
static const PropertyArray Glacier2Props;
diff --git a/cpp/src/IcePatch2Lib/ClientUtil.cpp b/cpp/src/IcePatch2Lib/ClientUtil.cpp
index 8bba1cc3784..ee965487fe6 100755
--- a/cpp/src/IcePatch2Lib/ClientUtil.cpp
+++ b/cpp/src/IcePatch2Lib/ClientUtil.cpp
@@ -156,22 +156,32 @@ IcePatch2::Patcher::Patcher(const CommunicatorPtr& communicator, const PatcherFe
{
PropertiesPtr properties = communicator->getProperties();
- const char* endpointsProperty = "IcePatch2.Endpoints";
- string endpoints = properties->getProperty(endpointsProperty);
- if(endpoints.empty())
+ const char* clientProxyProperty = "IcePatch2Client.Proxy";
+ std::string clientProxy = properties->getProperty(clientProxyProperty);
+ if(clientProxy.empty())
{
- throw string("property `") + endpointsProperty + "' is not set";
- }
+ const char* endpointsProperty = "IcePatch2.Endpoints";
+ string endpoints = properties->getProperty(endpointsProperty);
+ if(endpoints.empty())
+ {
+ ostringstream os;
+ os << "No proxy to IcePatch2 server. Please set `" << clientProxyProperty
+ << "' or `" << endpointsProperty << "'.";
+ throw os.str();
+ }
- Identity id;
- id.category = properties->getPropertyWithDefault("IcePatch2.InstanceName", "IcePatch2");
- id.name = "server";
+ Identity id;
+ id.category = properties->getPropertyWithDefault("IcePatch2.InstanceName", "IcePatch2");
+ id.name = "server";
+
+ clientProxy = "\"" + communicator->identityToString(id) + "\" :" + endpoints;
+ }
+ ObjectPrx serverBase = communicator->stringToProxy(clientProxy);
- ObjectPrx serverBase = communicator->stringToProxy("\"" + communicator->identityToString(id) + "\" :" + endpoints);
FileServerPrx server = FileServerPrx::checkedCast(serverBase);
if(!server)
{
- throw "proxy `" + communicator->identityToString(id) + ':' + endpoints + "' is not a file server.";
+ throw "proxy `" + clientProxy + "' is not a file server.";
}
init(server);
diff --git a/cs/src/Ice/PropertyNames.cs b/cs/src/Ice/PropertyNames.cs
index b3a98e7ddf4..f00d251fb25 100644
--- a/cs/src/Ice/PropertyNames.cs
+++ b/cs/src/Ice/PropertyNames.cs
@@ -8,7 +8,7 @@
// **********************************************************************
//
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Fri May 28 11:55:01 2010
+// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Mar 7 23:28:12 2011
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -426,6 +426,12 @@ namespace IceInternal
null
};
+ public static Property[] IcePatch2ClientProps =
+ {
+ new Property(@"^IcePatch2Client\.Proxy$", false, null),
+ null
+ };
+
public static Property[] IceSSLProps =
{
new Property(@"^IceSSL\.Alias$", false, null),
@@ -620,6 +626,7 @@ namespace IceInternal
IceGridAdminProps,
IceGridProps,
IcePatch2Props,
+ IcePatch2ClientProps,
IceSSLProps,
IceStormAdminProps,
Glacier2Props,
@@ -635,6 +642,7 @@ namespace IceInternal
"IceGridAdmin",
"IceGrid",
"IcePatch2",
+ "IcePatch2Client",
"IceSSL",
"IceStormAdmin",
"Glacier2",
diff --git a/java/src/IceInternal/PropertyNames.java b/java/src/IceInternal/PropertyNames.java
index f8ba438a6bb..19daf8dd288 100644
--- a/java/src/IceInternal/PropertyNames.java
+++ b/java/src/IceInternal/PropertyNames.java
@@ -8,7 +8,7 @@
// **********************************************************************
//
-// Generated by makeprops.py from file ../config/PropertyNames.xml, Fri May 28 11:55:01 2010
+// Generated by makeprops.py from file ./config/PropertyNames.xml, Mon Mar 7 23:28:12 2011
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -426,6 +426,12 @@ public final class PropertyNames
null
};
+ public static final Property IcePatch2ClientProps[] =
+ {
+ new Property("IcePatch2Client\\.Proxy", false, null),
+ null
+ };
+
public static final Property IceSSLProps[] =
{
new Property("IceSSL\\.Alias", false, null),
@@ -621,6 +627,7 @@ public final class PropertyNames
IceGridAdminProps,
IceGridProps,
IcePatch2Props,
+ IcePatch2ClientProps,
IceSSLProps,
IceStormAdminProps,
Glacier2Props,
@@ -636,6 +643,7 @@ public final class PropertyNames
"IceGridAdmin",
"IceGrid",
"IcePatch2",
+ "IcePatch2Client",
"IceSSL",
"IceStormAdmin",
"Glacier2",