Ticket #33478: patch-ice-cpp-clang.diff

File patch-ice-cpp-clang.diff, 94.7 KB (added by freebsd@…, 13 years ago)

Patch to enable clang support, fix memory leak in Glacier2 and security patch to IceGrid

  • Portfile

    diff -urN Portfile.orig Portfile
    old new  
    55
    66name            ice-cpp
    77version         3.4.2
    8 revision        1
     8revision        2
    99set branch      [join [lrange [split ${version} .] 0 1] .]
    1010categories      devel
    1111maintainers     blair
     
    4040                sha1 8c84d6e3b227f583d05e08251e07047e6c3a6b42 \
    4141                rmd160 7ce680a4eb5fa9d0bb6f8b8910e267dfc2373d75
    4242patchfiles      patch-ice.cpp.config.Make.rules.diff \
    43                 patch-ice.cpp.config.Make.rules.Darwin.diff
     43                patch-ice.cpp.config.Make.rules.Darwin.diff \
     44                patch-ice.cpp.allTests.py.diff \
     45                patch-ice.cpp.demo.IceGrid.secure.README.diff \
     46                patch-ice.cpp.demo.IceGrid.secure.application.xml.diff \
     47                patch-ice.cpp.demo.IceGrid.secure.config.admin.diff \
     48                patch-ice.cpp.demo.IceGrid.secure.config.client.diff \
     49                patch-ice.cpp.demo.IceGrid.secure.config.master.diff \
     50                patch-ice.cpp.demo.IceGrid.secure.config.node.diff \
     51                patch-ice.cpp.demo.IceGrid.secure.config.registry.diff \
     52                patch-ice.cpp.demo.IceGrid.secure.config.slave.diff \
     53                patch-ice.cpp.demo.IceGrid.secure.makecerts.py.diff \
     54                patch-ice.cpp.include.Freeze.Map.h.diff \
     55                patch-ice.cpp.include.Ice.Buffer.h.diff \
     56                patch-ice.cpp.include.Ice.ConnectionIF.h.diff \
     57                patch-ice.cpp.include.Ice.IconvStringConverter.h.diff \
     58                patch-ice.cpp.include.Ice.IncomingAsyncF.h.diff \
     59                patch-ice.cpp.include.Ice.LocalObjectF.h.diff \
     60                patch-ice.cpp.include.Ice.ObjectF.h.diff \
     61                patch-ice.cpp.include.Ice.OutgoingAsyncF.h.diff \
     62                patch-ice.cpp.include.Ice.Proxy.h.diff \
     63                patch-ice.cpp.include.Ice.ProxyF.h.diff \
     64                patch-ice.cpp.include.Ice.Stream.h.diff \
     65                patch-ice.cpp.include.Ice.StreamF.h.diff \
     66                patch-ice.cpp.include.IceUtil.Mutex.h.diff \
     67                patch-ice.cpp.src.Freeze.MapDb.cpp.diff \
     68                patch-ice.cpp.src.Freeze.MapI.cpp.diff \
     69                patch-ice.cpp.src.Freeze.SharedDbEnv.cpp.diff \
     70                patch-ice.cpp.src.Glacier2.Blobject.cpp.diff \
     71                patch-ice.cpp.src.Glacier2.Blobject.h.diff \
     72                patch-ice.cpp.src.Glacier2.RequestQueue.cpp.diff \
     73                patch-ice.cpp.src.Glacier2.RequestQueue.h.diff \
     74                patch-ice.cpp.src.Glacier2.RouterI.cpp.diff \
     75                patch-ice.cpp.src.Ice.ConnectionI.cpp.diff \
     76                patch-ice.cpp.src.Ice.IncomingAsync.cpp.diff \
     77                patch-ice.cpp.src.Ice.LocalObject.cpp.diff \
     78                patch-ice.cpp.src.Ice.Network.cpp.diff \
     79                patch-ice.cpp.src.Ice.Object.cpp.diff \
     80                patch-ice.cpp.src.Ice.OutgoingAsync.cpp.diff \
     81                patch-ice.cpp.src.Ice.PropertyNames.cpp.diff \
     82                patch-ice.cpp.src.Ice.PropertyNames.h.diff \
     83                patch-ice.cpp.src.Ice.ProxyFactory.cpp.diff \
     84                patch-ice.cpp.src.Ice.Service.cpp.diff \
     85                patch-ice.cpp.src.Ice.Stream.cpp.diff \
     86                patch-ice.cpp.src.IceGrid.AdminCallbackRouter.cpp.diff \
     87                patch-ice.cpp.src.IceGrid.DescriptorHelper.cpp.diff \
     88                patch-ice.cpp.src.IceGrid.Internal.ice.diff \
     89                patch-ice.cpp.src.IceGrid.InternalRegistryI.cpp.diff \
     90                patch-ice.cpp.src.IceGrid.InternalRegistryI.h.diff \
     91                patch-ice.cpp.src.IceGrid.NodeSessionManager.cpp.diff \
     92                patch-ice.cpp.src.IceGrid.ReplicaCache.cpp.diff \
     93                patch-ice.cpp.src.IceGrid.ReplicaSessionManager.cpp.diff \
     94                patch-ice.cpp.src.IceGrid.SessionI.h.diff \
     95                patch-ice.cpp.src.IceSSL.Instance.cpp.diff \
     96                patch-ice.cpp.src.IceSSL.InstanceF.h.diff \
     97                patch-ice.cpp.src.IceSSL.TrustManager.cpp.diff \
     98                patch-ice.cpp.src.IceSSL.TrustManagerF.h.diff \
     99                patch-ice.cpp.src.IceSSL.Util.cpp.diff \
     100                patch-ice.cpp.src.IceSSL.UtilF.h.diff \
     101                patch-ice.cpp.src.IceStorm.NodeI.cpp.diff \
     102                patch-ice.cpp.src.IceUtil.Cond.cpp.diff \
     103                patch-ice.cpp.src.IceUtil.CountDownLatch.cpp.diff \
     104                patch-ice.cpp.src.IceUtil.CtrlCHandler.cpp.diff \
     105                patch-ice.cpp.src.IceUtil.FileUtil.cpp.diff \
     106                patch-ice.cpp.src.IceUtil.RecMutex.cpp.diff \
     107                patch-ice.cpp.src.Slice.CPlusPlusUtil.cpp.diff \
     108                patch-ice.cpp.src.Slice.FileTracker.cpp.diff \
     109                patch-ice.cpp.src.slice2cpp.Gen.cpp.diff \
     110                patch-ice.cpp.src.slice2cs.Gen.cpp.diff \
     111                patch-ice.cpp.src.slice2java.Gen.cpp.diff \
     112                patch-ice.cpp.test.Glacier2.ssl.Server.cpp.diff \
     113                patch-ice.cpp.test.Ice.background.EndpointI.h.diff \
     114                patch-ice.cpp.test.Ice.custom.AllTests.cpp.diff \
     115                patch-ice.cpp.test.Ice.info.AllTests.cpp.diff \
     116                patch-ice.cpp.test.Ice.properties.run.py.diff \
     117                patch-ice.cpp.test.IceUtil.unicode.Client.cpp.diff \
     118                patch-ice.cpp.test.Slice.keyword.Client.cpp.diff \
     119                patch-ice.cpp.test.include.TestCommon.h.diff \
     120                patch-ice.scripts.TestUtil.py.diff
     121
    44122patch.pre_args  -p1
    45123platforms       darwin
    46124
     
    85163
    86164use_configure   no
    87165
    88 # Work around invalid C++ code by compiling with g++ instead of clang.  See
    89 # http://www.zeroc.com/forums/bug-reports/4965-slice2cpp-output-does-not-compile-standards-conformant-compiler.html
    90 if {${configure.compiler} == "clang"} {
    91         configure.compiler llvm-gcc-4.2
    92 }
    93 
    94166build {
    95167        set cmd "cd ${build.dir} && make prefix='${prefix}' embedded_runpath_prefix='${prefix}' CC='${configure.cc}' CXX='${configure.cxx}' OPTIMIZE='yes' BZIP2_HOME='${prefix}' DB_HOME='${prefix}' EXPAT_HOME='${prefix}' OPENSSL_HOME='${prefix}' READLINE_HOME='${prefix}' USE_READLINE=yes MCPP_HOME='${prefix}' LDPLATFORMFLAGS= all && cd doc && make"
    96168        ui_debug ${cmd}
  • files/patch-ice.cpp.allTests.py.diff

    diff -urN files/patch-ice.cpp.allTests.py.diff.orig files/patch-ice.cpp.allTests.py.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/allTests.py      2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/allTests.py   2012-03-04 20:14:52.000000000 +0100
     3@@ -25,6 +25,7 @@
     4 # List of all basic tests.
     5 #
     6 tests = [
     7+
     8     ("IceUtil/condvar", ["once", "win32only"]),
     9     ("IceUtil/thread",  ["once"]),
     10     ("IceUtil/unicode", ["once"]),
     11@@ -62,7 +63,7 @@
     12     ("Ice/servantLocator", ["core"]),
     13     ("Ice/interceptor", ["core"]),
     14     ("Ice/stringConverter", ["core"]),
     15-    ("Ice/udp", ["core"]),
     16+    ("Ice/udp", ["core", "nofreebsdjail"]),
     17     ("Ice/defaultServant", ["core"]),
     18     ("Ice/defaultValue", ["core"]),
     19     ("Ice/invoke", ["core", "novc6"]),
     20@@ -106,8 +107,8 @@
     21 #
     22 if TestUtil.isWin32() or os.getuid() == 0:
     23     tests += [
     24-        ("IceUtil/priority", ["core", "nodarwin"]),
     25-        ("Ice/threadPoolPriority", ["core", "nodarwin"])
     26+        ("IceUtil/priority", ["core", "nodarwin", "nofreebsd"]),
     27+        ("Ice/threadPoolPriority", ["core", "nodarwin", "nofreebsd"])
     28         ]
     29 
     30 if __name__ == "__main__":
  • files/patch-ice.cpp.demo.IceGrid.secure.README.diff

    diff -urN files/patch-ice.cpp.demo.IceGrid.secure.README.diff.orig files/patch-ice.cpp.demo.IceGrid.secure.README.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/demo/IceGrid/secure/README       2011-06-15 21:44:00.000000000 +0200
     2+++ Ice-3.4.2/cpp/demo/IceGrid/secure/README    2012-03-04 19:55:44.000000000 +0100
     3@@ -31,9 +31,10 @@
     4 the filesystem permissions to restrict access to the certificate.
     5 
     6 Once the certificates are generated, you can start the IceGrid
     7-registry, node, and Glacier2 router:
     8+registries, node, and Glacier2 router:
     9 
     10-$ icegridregistry --Ice.Config=config.registry
     11+$ icegridregistry --Ice.Config=config.master
     12+$ icegridregistry --Ice.Config=config.slave
     13 $ icegridnode --Ice.Config=config.node
     14 $ glacier2router --Ice.Config=config.glacier2
     15 
  • files/patch-ice.cpp.demo.IceGrid.secure.application.xml.diff

    diff -urN files/patch-ice.cpp.demo.IceGrid.secure.application.xml.diff.orig files/patch-ice.cpp.demo.IceGrid.secure.application.xml.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/demo/IceGrid/secure/application.xml      2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/demo/IceGrid/secure/application.xml   2012-03-04 19:55:44.000000000 +0100
     3@@ -20,8 +20,8 @@
     4       <property name="IceSSL.DefaultDir" value="certs"/>
     5 
     6       <property name="Ice.Admin.Endpoints" value="ssl -h 127.0.0.1"/>
     7-      <property name="IceSSL.TrustOnly.Client" value="CN=IceGrid Registry"/>
     8-      <property name="IceSSL.TrustOnly.Server.Ice.Admin" value="CN=IceGrid Node"/>
     9+      <property name="IceSSL.TrustOnly.Client" value="CN=Master;CN=Slave"/>
     10+      <property name="IceSSL.TrustOnly.Server.Ice.Admin" value="CN=Node"/>
     11     </properties>
     12 
     13     <node name="Node">
  • files/patch-ice.cpp.demo.IceGrid.secure.config.admin.diff

    diff -urN files/patch-ice.cpp.demo.IceGrid.secure.config.admin.diff.orig files/patch-ice.cpp.demo.IceGrid.secure.config.admin.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/demo/IceGrid/secure/config.admin 2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/demo/IceGrid/secure/config.admin      2012-03-04 19:55:44.000000000 +0100
     3@@ -14,7 +14,7 @@
     4 # SSL Configuration
     5 #
     6 IceSSL.DefaultDir=certs
     7-IceSSL.TrustOnly.Client=CN="IceGrid Registry";CN="Glacier2"
     8+IceSSL.TrustOnly.Client=CN="Master";CN="Slave";CN="Glacier2"
     9 
     10 # C++ configuration
     11 Ice.Plugin.IceSSL.cpp=IceSSL:createIceSSL
  • files/patch-ice.cpp.demo.IceGrid.secure.config.client.diff

    diff -urN files/patch-ice.cpp.demo.IceGrid.secure.config.client.diff.orig files/patch-ice.cpp.demo.IceGrid.secure.config.client.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/demo/IceGrid/secure/config.client        2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/demo/IceGrid/secure/config.client     2012-03-04 19:55:44.000000000 +0100
     3@@ -1,7 +1,7 @@
     4 #
     5 # The IceGrid locator proxy.
     6 #
     7-Ice.Default.Locator=DemoIceGrid/Locator:tcp -p 4061
     8+Ice.Default.Locator=DemoIceGrid/Locator:tcp -p 4061:tcp -p 14061
     9 
     10 #
     11 # Trace properties.
  • files/patch-ice.cpp.demo.IceGrid.secure.config.master.diff

    diff -urN files/patch-ice.cpp.demo.IceGrid.secure.config.master.diff.orig files/patch-ice.cpp.demo.IceGrid.secure.config.master.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/demo/IceGrid/secure/config.master        2012-03-04 19:55:44.000000000 +0100
     2+++ Ice-3.4.2/cpp/demo/IceGrid/secure/config.master     2012-03-04 19:55:44.000000000 +0100
     3@@ -0,0 +1,61 @@
     4+#
     5+# The IceGrid instance name.
     6+#
     7+IceGrid.InstanceName=DemoIceGrid
     8+
     9+#
     10+# IceGrid registry configuration.
     11+#
     12+IceGrid.Registry.Client.Endpoints=tcp -p 4061 -t 10000:ssl -p 4062 -t 10000
     13+IceGrid.Registry.Server.Endpoints=ssl -t 10000
     14+IceGrid.Registry.Internal.Endpoints=ssl -t 10000
     15+IceGrid.Registry.Data=db/master
     16+
     17+#
     18+# Ensure that nodes and slaves connecting to this registry have a name
     19+# matching the certificate CN.
     20+#
     21+IceGrid.Registry.RequireNodeCertCN=1
     22+IceGrid.Registry.RequireReplicaCertCN=1
     23+
     24+#
     25+# IceGrid admin clients must use a secure connection to connect to the
     26+# registry or use Glacier2.
     27+#
     28+IceGrid.Registry.AdminSessionManager.Endpoints=ssl -t 10000
     29+IceGrid.Registry.AdminPermissionsVerifier=DemoIceGrid/NullPermissionsVerifier
     30+
     31+#
     32+# IceGrid SQL configuration if using SQL database.
     33+#
     34+#Ice.Plugin.DB=IceGridSqlDB:createSqlDB
     35+#IceGrid.SQL.DatabaseType=QSQLITE
     36+#IceGrid.SQL.DatabaseName=db/master/Registry.db
     37+
     38+#
     39+# Trace properties.
     40+#
     41+Ice.ProgramName=Master
     42+IceGrid.Registry.Trace.Node=2
     43+IceGrid.Registry.Trace.Replica=2
     44+
     45+#
     46+# SSL Configuration
     47+#
     48+Ice.Plugin.IceSSL=IceSSL:createIceSSL
     49+IceSSL.DefaultDir=certs
     50+IceSSL.CertAuthFile=ca_cert.pem
     51+IceSSL.CertFile=master_cert.pem
     52+IceSSL.KeyFile=master_key.pem
     53+
     54+#
     55+# Don't require certificates. This is useful for admin clients that don't
     56+# use certificate but still need to establish a secure connection for the
     57+# username/password authentication
     58+#
     59+IceSSL.VerifyPeer=1
     60+
     61+IceSSL.TrustOnly.Client=CN="Master";CN="Slave";CN="Node";CN="Glacier2"
     62+IceSSL.TrustOnly.Server.IceGrid.Registry.Server=CN="Server"
     63+IceSSL.TrustOnly.Server.IceGrid.Registry.Internal=CN="Node";CN="Master";CN="Slave"
     64+IceSSL.TrustOnly.Server.IceGrid.Registry.AdminSessionManager=CN="Glacier2"
  • files/patch-ice.cpp.demo.IceGrid.secure.config.node.diff

    diff -urN files/patch-ice.cpp.demo.IceGrid.secure.config.node.diff.orig files/patch-ice.cpp.demo.IceGrid.secure.config.node.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/demo/IceGrid/secure/config.node  2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/demo/IceGrid/secure/config.node       2012-03-04 19:55:44.000000000 +0100
     3@@ -1,7 +1,7 @@
     4 #
     5 # The IceGrid locator proxy.
     6 #
     7-Ice.Default.Locator=DemoIceGrid/Locator:ssl -p 4062 -t 10000
     8+Ice.Default.Locator=DemoIceGrid/Locator:ssl -p 4062 -t 10000:ssl -p 14062 -t 10000
     9 
     10 #
     11 # IceGrid node configuration.
     12@@ -26,5 +26,5 @@
     13 IceSSL.CertFile=node_cert.pem
     14 IceSSL.KeyFile=node_key.pem
     15 
     16-IceSSL.TrustOnly.Client=CN="Server";CN="IceGrid Registry"
     17-IceSSL.TrustOnly.Server=CN="IceGrid Registry"
     18+IceSSL.TrustOnly.Client=CN="Server";CN="Master";CN="Slave"
     19+IceSSL.TrustOnly.Server=CN="Master";CN="Slave"
  • files/patch-ice.cpp.demo.IceGrid.secure.config.registry.diff

    diff -urN files/patch-ice.cpp.demo.IceGrid.secure.config.registry.diff.orig files/patch-ice.cpp.demo.IceGrid.secure.config.registry.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/demo/IceGrid/secure/config.registry      2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/demo/IceGrid/secure/config.registry   2012-03-04 19:55:44.000000000 +0100
     3@@ -1,54 +0,0 @@
     4-#
     5-# The IceGrid instance name.
     6-#
     7-IceGrid.InstanceName=DemoIceGrid
     8-
     9-#
     10-# IceGrid registry configuration.
     11-#
     12-IceGrid.Registry.Client.Endpoints=tcp -p 4061 -t 10000:ssl -p 4062 -t 10000
     13-IceGrid.Registry.Server.Endpoints=ssl -t 10000
     14-IceGrid.Registry.Internal.Endpoints=ssl -t 10000
     15-IceGrid.Registry.Data=db/registry
     16-
     17-#
     18-# IceGrid admin clients must use a secure connection to connect to the
     19-# registry or use Glacier2.
     20-#
     21-IceGrid.Registry.AdminSessionManager.Endpoints=ssl -t 10000
     22-IceGrid.Registry.AdminPermissionsVerifier=DemoIceGrid/NullPermissionsVerifier
     23-
     24-#
     25-# IceGrid SQL configuration if using SQL database.
     26-#
     27-#Ice.Plugin.DB=IceGridSqlDB:createSqlDB
     28-#IceGrid.SQL.DatabaseType=QSQLITE
     29-#IceGrid.SQL.DatabaseName=db/registry/Registry.db
     30-
     31-#
     32-# Trace properties.
     33-#
     34-Ice.ProgramName=Registry
     35-IceGrid.Registry.Trace.Node=2
     36-IceGrid.Registry.Trace.Replica=2
     37-
     38-#
     39-# SSL Configuration
     40-#
     41-Ice.Plugin.IceSSL=IceSSL:createIceSSL
     42-IceSSL.DefaultDir=certs
     43-IceSSL.CertAuthFile=ca_cert.pem
     44-IceSSL.CertFile=registry_cert.pem
     45-IceSSL.KeyFile=registry_key.pem
     46-
     47-#
     48-# Don't require certificates. This is useful for admin clients that don't
     49-# use certificate but still need to establish a secure connection for the
     50-# username/password authentication
     51-#
     52-IceSSL.VerifyPeer=1
     53-
     54-IceSSL.TrustOnly.Client=CN="IceGrid Registry";CN="IceGrid Node";CN="Glacier2"
     55-IceSSL.TrustOnly.Server.IceGrid.Registry.Server=CN="Server"
     56-IceSSL.TrustOnly.Server.IceGrid.Registry.Internal=CN="IceGrid Node";CN="IceGrid Registry"
     57-IceSSL.TrustOnly.Server.IceGrid.Registry.AdminSessionManager=CN="Glacier2"
  • files/patch-ice.cpp.demo.IceGrid.secure.config.slave.diff

    diff -urN files/patch-ice.cpp.demo.IceGrid.secure.config.slave.diff.orig files/patch-ice.cpp.demo.IceGrid.secure.config.slave.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/demo/IceGrid/secure/config.slave 2012-03-04 19:55:44.000000000 +0100
     2+++ Ice-3.4.2/cpp/demo/IceGrid/secure/config.slave      2012-03-04 19:55:44.000000000 +0100
     3@@ -0,0 +1,66 @@
     4+#
     5+# The IceGrid locator proxy.
     6+#
     7+Ice.Default.Locator=DemoIceGrid/Locator:ssl -p 4062 -t 10000
     8+
     9+#
     10+# The IceGrid instance name.
     11+#
     12+IceGrid.InstanceName=DemoIceGrid
     13+
     14+#
     15+# IceGrid registry configuration.
     16+#
     17+IceGrid.Registry.Client.Endpoints=tcp -p 14061 -t 10000:ssl -p 14062 -t 10000
     18+IceGrid.Registry.Server.Endpoints=ssl -t 10000
     19+IceGrid.Registry.Internal.Endpoints=ssl -t 10000
     20+IceGrid.Registry.Data=db/slave
     21+IceGrid.Registry.ReplicaName=Slave
     22+
     23+#
     24+# Ensure that nodes connecting to this registry have a name matching
     25+# the certificate CN.
     26+#
     27+IceGrid.Registry.RequireNodeCertCN=1
     28+
     29+#
     30+# IceGrid admin clients must use a secure connection to connect to the
     31+# registry or use Glacier2.
     32+#
     33+IceGrid.Registry.AdminSessionManager.Endpoints=ssl -t 10000
     34+IceGrid.Registry.AdminPermissionsVerifier=DemoIceGrid/NullPermissionsVerifier
     35+
     36+#
     37+# IceGrid SQL configuration if using SQL database.
     38+#
     39+#Ice.Plugin.DB=IceGridSqlDB:createSqlDB
     40+#IceGrid.SQL.DatabaseType=QSQLITE
     41+#IceGrid.SQL.DatabaseName=db/slave/Registry.db
     42+
     43+#
     44+# Trace properties.
     45+#
     46+Ice.ProgramName=Slave
     47+IceGrid.Registry.Trace.Node=2
     48+IceGrid.Registry.Trace.Replica=2
     49+
     50+#
     51+# SSL Configuration
     52+#
     53+Ice.Plugin.IceSSL=IceSSL:createIceSSL
     54+IceSSL.DefaultDir=certs
     55+IceSSL.CertAuthFile=ca_cert.pem
     56+IceSSL.CertFile=slave_cert.pem
     57+IceSSL.KeyFile=slave_key.pem
     58+
     59+#
     60+# Don't require certificates. This is useful for admin clients that don't
     61+# use certificate but still need to establish a secure connection for the
     62+# username/password authentication
     63+#
     64+IceSSL.VerifyPeer=1
     65+
     66+IceSSL.TrustOnly.Client=CN="Master";CN="Slave";CN="Node";CN="Glacier2"
     67+IceSSL.TrustOnly.Server.IceGrid.Registry.Server=CN="Server"
     68+IceSSL.TrustOnly.Server.IceGrid.Registry.Internal=CN="Node";CN="Master";CN="Slave"
     69+IceSSL.TrustOnly.Server.IceGrid.Registry.AdminSessionManager=CN="Glacier2"
  • files/patch-ice.cpp.demo.IceGrid.secure.makecerts.py.diff

    diff -urN files/patch-ice.cpp.demo.IceGrid.secure.makecerts.py.diff.orig files/patch-ice.cpp.demo.IceGrid.secure.makecerts.py.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/demo/IceGrid/secure/makecerts.py 2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/demo/IceGrid/secure/makecerts.py      2012-03-04 19:55:44.000000000 +0100
     3@@ -44,8 +44,9 @@
     4 print
     5 print
     6 
     7-createCertificate("registry", "IceGrid Registry")
     8-createCertificate("node", "IceGrid Node")
     9+createCertificate("master", "Master")
     10+createCertificate("slave", "Slave")
     11+createCertificate("node", "Node")
     12 createCertificate("glacier2", "Glacier2")
     13 createCertificate("server", "Server")
     14 
  • files/patch-ice.cpp.include.Freeze.Map.h.diff

    diff -urN files/patch-ice.cpp.include.Freeze.Map.h.diff.orig files/patch-ice.cpp.include.Freeze.Map.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/Freeze/Map.h     2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/Freeze/Map.h  2012-03-04 20:14:52.000000000 +0100
     3@@ -426,7 +426,7 @@
     4 
     5     ConstIterator(MapHelper& mapHelper, const Ice::CommunicatorPtr& communicator) :
     6         _helper(IteratorHelper::create(mapHelper, true)),
     7-        _communicator(_communicator),
     8+        _communicator(communicator),
     9         _refValid(false)
     10     {
     11     }
  • files/patch-ice.cpp.include.Ice.Buffer.h.diff

    diff -urN files/patch-ice.cpp.include.Ice.Buffer.h.diff.orig files/patch-ice.cpp.include.Ice.Buffer.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/Ice/Buffer.h     2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/Ice/Buffer.h  2012-03-04 20:14:52.000000000 +0100
     3@@ -10,6 +10,7 @@
     4 #ifndef ICEE_BUFFER_H
     5 #define ICEE_BUFFER_H
     6 
     7+#include <cstddef>
     8 #include <Ice/Config.h>
     9 
     10 namespace IceInternal
  • files/patch-ice.cpp.include.Ice.ConnectionIF.h.diff

    diff -urN files/patch-ice.cpp.include.Ice.ConnectionIF.h.diff.orig files/patch-ice.cpp.include.Ice.ConnectionIF.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/Ice/ConnectionIF.h       2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/Ice/ConnectionIF.h    2012-03-04 20:14:52.000000000 +0100
     3@@ -17,13 +17,13 @@
     4 {
     5 
     6 class ConnectionI;
     7+ICE_API Ice::LocalObject* upCast(Ice::ConnectionI*);
     8 
     9 }
     10 
     11 namespace IceInternal
     12 {
     13 
     14-ICE_API Ice::LocalObject* upCast(Ice::ConnectionI*);
     15 
     16 enum AsyncStatus
     17 {
  • files/patch-ice.cpp.include.Ice.IconvStringConverter.h.diff

    diff -urN files/patch-ice.cpp.include.Ice.IconvStringConverter.h.diff.orig files/patch-ice.cpp.include.Ice.IconvStringConverter.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/Ice/IconvStringConverter.h       2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/Ice/IconvStringConverter.h    2012-03-04 20:14:52.000000000 +0100
     3@@ -225,10 +225,16 @@
     4 template<typename charT> /*static*/ void
     5 IconvStringConverter<charT>::close(std::pair<iconv_t, iconv_t> cdp)
     6 {
     7-    int rs = iconv_close(cdp.first);
     8+#ifndef NDEBUG
     9+    int rs =
     10+#endif
     11+    iconv_close(cdp.first);
     12     assert(rs == 0);
     13 
     14-    rs = iconv_close(cdp.second);
     15+#ifndef NDEBUG
     16+    rs =
     17+#endif
     18+    iconv_close(cdp.second);
     19     assert(rs == 0);
     20 }
     21 
  • files/patch-ice.cpp.include.Ice.IncomingAsyncF.h.diff

    diff -urN files/patch-ice.cpp.include.Ice.IncomingAsyncF.h.diff.orig files/patch-ice.cpp.include.Ice.IncomingAsyncF.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/Ice/IncomingAsyncF.h     2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/Ice/IncomingAsyncF.h  2012-03-04 20:14:52.000000000 +0100
     3@@ -28,12 +28,6 @@
     4 
     5 class AMD_Object_ice_invoke;
     6 class AMD_Array_Object_ice_invoke;
     7-
     8-}
     9-
     10-namespace IceInternal
     11-{
     12-
     13 ICE_API IceUtil::Shared* upCast(::Ice::AMD_Object_ice_invoke*);
     14 ICE_API IceUtil::Shared* upCast(::Ice::AMD_Array_Object_ice_invoke*);
     15 
  • files/patch-ice.cpp.include.Ice.LocalObjectF.h.diff

    diff -urN files/patch-ice.cpp.include.Ice.LocalObjectF.h.diff.orig files/patch-ice.cpp.include.Ice.LocalObjectF.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/Ice/LocalObjectF.h       2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/Ice/LocalObjectF.h    2012-03-04 20:14:52.000000000 +0100
     3@@ -18,12 +18,6 @@
     4 {
     5 
     6 class LocalObject;
     7-
     8-}
     9-
     10-namespace IceInternal
     11-{
     12-
     13 ICE_API IceUtil::Shared* upCast(::Ice::LocalObject*);
     14 
     15 }
  • files/patch-ice.cpp.include.Ice.ObjectF.h.diff

    diff -urN files/patch-ice.cpp.include.Ice.ObjectF.h.diff.orig files/patch-ice.cpp.include.Ice.ObjectF.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/Ice/ObjectF.h    2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/Ice/ObjectF.h 2012-03-04 20:14:52.000000000 +0100
     3@@ -17,19 +17,8 @@
     4 {
     5 
     6 class Object;
     7-
     8-}
     9-
     10-namespace IceInternal
     11-{
     12-
     13 ICE_API IceUtil::Shared* upCast(::Ice::Object*);
     14 
     15-}
     16-
     17-namespace Ice
     18-{
     19-
     20 typedef IceInternal::Handle< Object > ObjectPtr;
     21 
     22 void ICE_API __patch__ObjectPtr(void*, ObjectPtr&);
  • files/patch-ice.cpp.include.Ice.OutgoingAsyncF.h.diff

    diff -urN files/patch-ice.cpp.include.Ice.OutgoingAsyncF.h.diff.orig files/patch-ice.cpp.include.Ice.OutgoingAsyncF.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/Ice/OutgoingAsyncF.h     2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/Ice/OutgoingAsyncF.h  2012-03-04 20:14:52.000000000 +0100
     3@@ -19,13 +19,13 @@
     4 
     5 class AsyncResult;
     6 typedef IceInternal::Handle<AsyncResult> AsyncResultPtr;
     7+ICE_API IceUtil::Shared* upCast(::Ice::AsyncResult*);
     8 
     9 }
     10 
     11 namespace IceInternal
     12 {
     13 
     14-ICE_API IceUtil::Shared* upCast(::Ice::AsyncResult*);
     15 
     16 class OutgoingAsync;
     17 ICE_API IceUtil::Shared* upCast(OutgoingAsync*);
  • files/patch-ice.cpp.include.Ice.Proxy.h.diff

    diff -urN files/patch-ice.cpp.include.Ice.Proxy.h.diff.orig files/patch-ice.cpp.include.Ice.Proxy.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/Ice/Proxy.h      2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/Ice/Proxy.h   2012-03-04 20:14:52.000000000 +0100
     3@@ -38,6 +38,8 @@
     4 
     5 class Locator;
     6 class Router;
     7+ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Locator*);
     8+ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Router*);
     9 
     10 }
     11 
     12@@ -46,8 +48,6 @@
     13 namespace IceInternal
     14 {
     15 
     16-ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Locator*);
     17-ICE_API ::IceProxy::Ice::Object* upCast(::IceProxy::Ice::Router*);
     18 
     19 class LocalExceptionWrapper;
     20 
     21@@ -1172,7 +1172,7 @@
     22 
     23     TwowayCallbackNC(const TPtr& instance, bool cb, Exception excb, Sent sentcb) : CallbackNC<T>(instance, excb, sentcb)
     24     {
     25-        checkCallback(instance, cb || excb != 0);
     26+        this->checkCallback(instance, cb || excb != 0);
     27     }
     28 };
     29 
     30@@ -1188,7 +1188,7 @@
     31 
     32     TwowayCallback(const TPtr& instance, bool cb, Exception excb, Sent sentcb) : Callback<T, CT>(instance, excb, sentcb)
     33     {
     34-        checkCallback(instance, cb || excb != 0);
     35+        this->checkCallback(instance, cb || excb != 0);
     36     }
     37 };
     38 
     39@@ -1209,7 +1209,7 @@
     40     OnewayCallbackNC(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
     41         CallbackNC<T>(instance, excb, sentcb), response(cb)
     42     {
     43-        checkCallback(instance, cb != 0 || excb != 0);
     44+        this->checkCallback(instance, cb != 0 || excb != 0);
     45     }
     46 
     47     virtual void __completed(const ::Ice::AsyncResultPtr& result) const
     48@@ -1254,7 +1254,7 @@
     49     OnewayCallback(const TPtr& instance, Response cb, Exception excb, Sent sentcb) :
     50         Callback<T, CT>(instance, excb, sentcb),  response(cb)
     51     {
     52-        checkCallback(instance, cb != 0 || excb != 0);
     53+        this->checkCallback(instance, cb != 0 || excb != 0);
     54     }
     55 
     56     virtual void __completed(const ::Ice::AsyncResultPtr& result) const
  • files/patch-ice.cpp.include.Ice.ProxyF.h.diff

    diff -urN files/patch-ice.cpp.include.Ice.ProxyF.h.diff.orig files/patch-ice.cpp.include.Ice.ProxyF.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/Ice/ProxyF.h     2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/Ice/ProxyF.h  2012-03-04 20:14:52.000000000 +0100
     3@@ -22,6 +22,11 @@
     4 {
     5 
     6 class Object;
     7+inline ::IceProxy::Ice::Object*
     8+upCast(::IceProxy::Ice::Object* o)
     9+{
     10+    return o;
     11+}
     12 
     13 }
     14 
     15@@ -34,6 +39,11 @@
     16 {
     17 
     18 class Object;
     19+inline ::IceDelegate::Ice::Object*
     20+upCast(::IceDelegate::Ice::Object* o)
     21+{
     22+    return o;
     23+}
     24 
     25 }
     26 
     27@@ -47,6 +57,12 @@
     28 
     29 class Object;
     30 
     31+inline ::IceDelegateM::Ice::Object*
     32+upCast(::IceDelegateM::Ice::Object* o)
     33+{
     34+    return o;
     35+}
     36+
     37 }
     38 
     39 }
     40@@ -58,36 +74,12 @@
     41 {
     42 
     43 class Object;
     44-
     45-}
     46-
     47-}
     48-
     49-namespace IceInternal
     50-{
     51-
     52-inline ::IceProxy::Ice::Object*
     53-upCast(::IceProxy::Ice::Object* o)
     54-{
     55-    return o;
     56-}
     57-
     58-inline ::IceDelegate::Ice::Object*
     59-upCast(::IceDelegate::Ice::Object* o)
     60-{
     61-    return o;
     62-}
     63-
     64 inline ::IceDelegateD::Ice::Object*
     65 upCast(::IceDelegateD::Ice::Object* o)
     66 {
     67     return o;
     68 }
     69 
     70-inline ::IceDelegateM::Ice::Object*
     71-upCast(::IceDelegateM::Ice::Object* o)
     72-{
     73-    return o;
     74 }
     75 
     76 }
  • files/patch-ice.cpp.include.Ice.Stream.h.diff

    diff -urN files/patch-ice.cpp.include.Ice.Stream.h.diff.orig files/patch-ice.cpp.include.Ice.Stream.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/Ice/Stream.h     2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/Ice/Stream.h  2012-03-04 20:14:52.000000000 +0100
     3@@ -17,6 +17,12 @@
     4 #include <Ice/Proxy.h>
     5 #include <IceUtil/Shared.h>
     6 
     7+namespace IceInternal
     8+{
     9+    // Forward declaration required for writer specializations.
     10+    void delegateThrowMarshalException(const char*, int, const ::std::string&);
     11+}
     12+
     13 namespace Ice
     14 {
     15     
     16@@ -45,9 +51,6 @@
     17     StreamTraitTypeUnknown
     18 };
     19 
     20-// Forward declaration required for writer specializations.
     21-class MarshalException;
     22-
     23 //
     24 // Base trait template. This doesn't actually do anything -- we just
     25 // use it as a template that we can specialize.
     26@@ -542,7 +545,7 @@
     27     {
     28         if(static_cast<int>(v) < 0 || static_cast<int>(v) >= StreamTrait<T>::enumLimit)
     29         {
     30-            throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
     31+            IceInternal::delegateThrowMarshalException(__FILE__, __LINE__, "enumerator out of range");
     32         }
     33         outS->write(static_cast<Byte>(v));
     34     }
     35@@ -558,7 +561,7 @@
     36         inS->read(val);
     37         if(val > StreamTrait<T>::enumLimit)
     38         {
     39-            throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
     40+            IceInternal::delegateThrowMarshalException(__FILE__, __LINE__, "enumerator out of range");
     41         }
     42         v = static_cast<T>(val);
     43     }
     44@@ -573,7 +576,7 @@
     45     {
     46         if(static_cast<int>(v) < 0 || static_cast<int>(v) >= StreamTrait<T>::enumLimit)
     47         {
     48-            throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
     49+            IceInternal::delegateThrowMarshalException(__FILE__, __LINE__, "enumerator out of range");
     50         }
     51         outS->write(static_cast<Short>(v));
     52     }
     53@@ -589,7 +592,7 @@
     54         inS->read(val);
     55         if(val < 0 || val > StreamTrait<T>::enumLimit)
     56         {
     57-            throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
     58+            IceInternal::delegateThrowMarshalException(__FILE__, __LINE__, "enumerator out of range");
     59         }
     60         v = static_cast<T>(val);
     61     }
     62@@ -603,7 +606,7 @@
     63     {
     64         if(static_cast<int>(v) < 0 || static_cast<int>(v) >= StreamTrait<T>::enumLimit)
     65         {
     66-            throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
     67+            IceInternal::delegateThrowMarshalException(__FILE__, __LINE__, "enumerator out of range");
     68         }
     69         outS->write(static_cast<Int>(v));
     70     }
     71@@ -619,7 +622,7 @@
     72         inS->read(val);
     73         if(val < 0 || val > StreamTrait<T>::enumLimit)
     74         {
     75-            throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
     76+            IceInternal::delegateThrowMarshalException(__FILE__, __LINE__, "enumerator out of range");
     77         }
     78         v = static_cast<T>(val);
     79     }
  • files/patch-ice.cpp.include.Ice.StreamF.h.diff

    diff -urN files/patch-ice.cpp.include.Ice.StreamF.h.diff.orig files/patch-ice.cpp.include.Ice.StreamF.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/Ice/StreamF.h    2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/Ice/StreamF.h 2012-03-04 20:14:52.000000000 +0100
     3@@ -19,12 +19,6 @@
     4 
     5 class InputStream;
     6 class OutputStream;
     7-
     8-}
     9-
     10-namespace IceInternal
     11-{
     12-
     13 ICE_API IceUtil::Shared* upCast(::Ice::InputStream*);
     14 ICE_API IceUtil::Shared* upCast(::Ice::OutputStream*);
     15 
  • files/patch-ice.cpp.include.IceUtil.Mutex.h.diff

    diff -urN files/patch-ice.cpp.include.IceUtil.Mutex.h.diff.orig files/patch-ice.cpp.include.IceUtil.Mutex.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/include/IceUtil/Mutex.h  2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/include/IceUtil/Mutex.h       2012-03-04 20:14:52.000000000 +0100
     3@@ -251,8 +251,11 @@
     4 inline
     5 Mutex::~Mutex()
     6 {
     7+#ifndef NDEBUG
     8     int rc = 0;
     9-    rc = pthread_mutex_destroy(&_mutex);
     10+    rc =
     11+#endif   
     12+    pthread_mutex_destroy(&_mutex);
     13     assert(rc == 0);
     14 }
     15 
  • files/patch-ice.cpp.src.Freeze.MapDb.cpp.diff

    diff -urN files/patch-ice.cpp.src.Freeze.MapDb.cpp.diff.orig files/patch-ice.cpp.src.Freeze.MapDb.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Freeze/MapDb.cpp     2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Freeze/MapDb.cpp  2012-03-04 20:14:52.000000000 +0100
     3@@ -229,7 +229,11 @@
     4 #ifndef NDEBUG
     5                 bool inserted =
     6 #endif
     7-                    _indices.insert(IndexMap::value_type(indexBase->name(), indexI.get())).second;
     8+                    _indices.insert(IndexMap::value_type(indexBase->name(), indexI.get()))
     9+#ifndef NDEBUG                   
     10+                    .second
     11+#endif
     12+                ;
     13                 assert(inserted);
     14                 
     15                 indexBase->_impl = indexI.release();
  • files/patch-ice.cpp.src.Freeze.MapI.cpp.diff

    diff -urN files/patch-ice.cpp.src.Freeze.MapI.cpp.diff.orig files/patch-ice.cpp.src.Freeze.MapI.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Freeze/MapI.cpp      2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Freeze/MapI.cpp   2012-03-04 20:14:52.000000000 +0100
     3@@ -749,8 +749,11 @@
     4 
     5     try
     6     {
     7+#ifndef NDEBUG
     8         int err;
     9-        err = _dbc->put(&dbKey, &dbValue, DB_CURRENT);
     10+        err =
     11+#endif
     12+        _dbc->put(&dbKey, &dbValue, DB_CURRENT);
     13         assert(err == 0);
     14     }
     15     catch(const ::DbDeadlockException& dx)
     16@@ -1023,7 +1026,11 @@
     17 #ifndef NDEBUG
     18         bool inserted =
     19 #endif
     20-            _indices.insert(IndexMap::value_type(indexBase->name(), indexBase)).second;
     21+            _indices.insert(IndexMap::value_type(indexBase->name(), indexBase))
     22+#ifndef NDEBUG
     23+            .second
     24+#endif
     25+            ;
     26         assert(inserted);
     27         indexBase->_map = this;
     28     }
     29@@ -1360,8 +1367,11 @@
     30         try
     31         {
     32             u_int32_t count;
     33+#ifndef NDEBUG
     34             int err;
     35-            err = _db->truncate(txn, &count, txn != 0 ? 0 : DB_AUTO_COMMIT);
     36+            err =
     37+#endif           
     38+            _db->truncate(txn, &count, txn != 0 ? 0 : DB_AUTO_COMMIT);
     39             assert(err == 0);
     40             break;
     41         }
  • files/patch-ice.cpp.src.Freeze.SharedDbEnv.cpp.diff

    diff -urN files/patch-ice.cpp.src.Freeze.SharedDbEnv.cpp.diff.orig files/patch-ice.cpp.src.Freeze.SharedDbEnv.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Freeze/SharedDbEnv.cpp       2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Freeze/SharedDbEnv.cpp    2012-03-04 20:14:52.000000000 +0100
     3@@ -336,8 +336,11 @@
     4         // Remove from map
     5         //
     6     
     7+#ifndef NDEBUG
     8         size_t one;
     9-        one = sharedDbEnvMap->erase(key);
     10+        one =
     11+#endif
     12+        sharedDbEnvMap->erase(key);
     13         assert(one == 1);
     14 
     15         if(sharedDbEnvMap->size() == 0)
  • files/patch-ice.cpp.src.Glacier2.Blobject.cpp.diff

    diff -urN files/patch-ice.cpp.src.Glacier2.Blobject.cpp.diff.orig files/patch-ice.cpp.src.Glacier2.Blobject.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Glacier2/Blobject.cpp        2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Glacier2/Blobject.cpp     2012-03-04 19:39:27.000000000 +0100
     3@@ -171,6 +171,15 @@
     4 }
     5 
     6 void
     7+Glacier2::Blobject::destroy()
     8+{
     9+    if(_requestQueue)
     10+    {
     11+        _requestQueue->destroy();
     12+    }
     13+}
     14+
     15+void
     16 Glacier2::Blobject::invoke(ObjectPrx& proxy, const AMD_Object_ice_invokePtr& amdCB,
     17                            const std::pair<const Ice::Byte*, const Ice::Byte*>& inParams, const Current& current)
     18 {
  • files/patch-ice.cpp.src.Glacier2.Blobject.h.diff

    diff -urN files/patch-ice.cpp.src.Glacier2.Blobject.h.diff.orig files/patch-ice.cpp.src.Glacier2.Blobject.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Glacier2/Blobject.h  2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Glacier2/Blobject.h       2012-03-04 19:39:27.000000000 +0100
     3@@ -24,6 +24,8 @@
     4     Blobject(const InstancePtr&, const Ice::ConnectionPtr&, const Ice::Context&);
     5     virtual ~Blobject();
     6 
     7+    void destroy();
     8+
     9 protected:
     10 
     11     void invoke(Ice::ObjectPrx&, const Ice::AMD_Object_ice_invokePtr&,
  • files/patch-ice.cpp.src.Glacier2.RequestQueue.cpp.diff

    diff -urN files/patch-ice.cpp.src.Glacier2.RequestQueue.cpp.diff.orig files/patch-ice.cpp.src.Glacier2.RequestQueue.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Glacier2/RequestQueue.cpp    2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Glacier2/RequestQueue.cpp 2012-03-04 19:39:27.000000000 +0100
     3@@ -185,7 +185,8 @@
     4     _callback(newCallback_Object_ice_invoke(this, &RequestQueue::response, &RequestQueue::exception,
     5                                             &RequestQueue::sent)),
     6     _flushCallback(newCallback_Connection_flushBatchRequests(this, &RequestQueue::exception, &RequestQueue::sent)),
     7-    _pendingSend(false)
     8+    _pendingSend(false),
     9+    _destroyed(false)
     10 {
     11 }
     12 
     13@@ -241,6 +242,37 @@
     14 }
     15 
     16 void
     17+Glacier2::RequestQueue::destroy()
     18+{
     19+    IceUtil::Mutex::Lock lock(*this);
     20+
     21+    _destroyed = true;
     22+
     23+    //
     24+    // Although the session has been destroyed, we cannot destroy this queue
     25+    // until all requests have completed.
     26+    //
     27+    if(_requests.empty())
     28+    {
     29+        destroyInternal();
     30+    }
     31+}
     32+
     33+void
     34+Glacier2::RequestQueue::destroyInternal()
     35+{
     36+    //
     37+    // Must be called with the mutex locked.
     38+    //
     39+
     40+    //
     41+    // Remove cyclic references.
     42+    //
     43+    const_cast<Ice::Callback_Object_ice_invokePtr&>(_callback) = 0;
     44+    const_cast<Ice::Callback_Connection_flushBatchRequestsPtr&>(_flushCallback) = 0;
     45+}
     46+
     47+void
     48 Glacier2::RequestQueue::flush()
     49 {
     50     assert(_connection);
     51@@ -289,6 +321,11 @@
     52             _pendingSendRequest = 0;
     53         }
     54     }
     55+
     56+    if(_destroyed && _requests.empty())
     57+    {
     58+        destroyInternal();
     59+    }
     60 }
     61 
     62 void
     63@@ -312,6 +349,11 @@
     64         }
     65     }
     66     _requests.clear();
     67+
     68+    if(_destroyed)
     69+    {
     70+        destroyInternal();
     71+    }
     72 }
     73 
     74 void
  • files/patch-ice.cpp.src.Glacier2.RequestQueue.h.diff

    diff -urN files/patch-ice.cpp.src.Glacier2.RequestQueue.h.diff.orig files/patch-ice.cpp.src.Glacier2.RequestQueue.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Glacier2/RequestQueue.h      2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Glacier2/RequestQueue.h   2012-03-04 19:39:27.000000000 +0100
     3@@ -65,8 +65,12 @@
     4     bool addRequest(const RequestPtr&);
     5     void flushRequests(std::set<Ice::ObjectPrx>&);
     6 
     7+    void destroy();
     8+
     9 private:
     10 
     11+    void destroyInternal();
     12+
     13     void flush();
     14     void flush(std::set<Ice::ObjectPrx>&);
     15 
     16@@ -83,6 +87,7 @@
     17     std::deque<RequestPtr> _requests;
     18     bool _pendingSend;
     19     RequestPtr _pendingSendRequest;
     20+    bool _destroyed;
     21 };
     22 typedef IceUtil::Handle<RequestQueue> RequestQueuePtr;
     23 
  • files/patch-ice.cpp.src.Glacier2.RouterI.cpp.diff

    diff -urN files/patch-ice.cpp.src.Glacier2.RouterI.cpp.diff.orig files/patch-ice.cpp.src.Glacier2.RouterI.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Glacier2/RouterI.cpp 2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Glacier2/RouterI.cpp      2012-03-04 19:39:27.000000000 +0100
     3@@ -98,6 +98,12 @@
     4             _session->destroy_async(amiCB);
     5         }
     6     }
     7+
     8+    _clientBlobject->destroy();
     9+    if(_serverBlobject)
     10+    {
     11+        _serverBlobject->destroy();
     12+    }
     13 }
     14 
     15 ObjectPrx
  • files/patch-ice.cpp.src.Ice.ConnectionI.cpp.diff

    diff -urN files/patch-ice.cpp.src.Ice.ConnectionI.cpp.diff.orig files/patch-ice.cpp.src.Ice.ConnectionI.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Ice/ConnectionI.cpp  2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Ice/ConnectionI.cpp       2012-03-04 20:14:52.000000000 +0100
     3@@ -31,7 +31,7 @@
     4 using namespace Ice;
     5 using namespace IceInternal;
     6 
     7-Ice::LocalObject* IceInternal::upCast(ConnectionI* p) { return p; }
     8+Ice::LocalObject* Ice::upCast(ConnectionI* p) { return p; }
     9 
     10 namespace
     11 {
     12@@ -600,6 +600,7 @@
     13     }
     14     catch(const LocalException& ex)
     15     {
     16+        status = IceInternal::AsyncStatusQueued; // this is only to apeace the compiler
     17         setState(StateClosed, ex);
     18         assert(_exception.get());
     19         _exception->ice_throw();
     20@@ -971,6 +972,7 @@
     21     }
     22     catch(const Ice::LocalException& ex)
     23     {
     24+        status = IceInternal::AsyncStatusQueued; // this is only to apeace the compiler
     25         setState(StateClosed, ex);
     26         assert(_exception.get());
     27         _exception->ice_throw();
  • files/patch-ice.cpp.src.Ice.IncomingAsync.cpp.diff

    diff -urN files/patch-ice.cpp.src.Ice.IncomingAsync.cpp.diff.orig files/patch-ice.cpp.src.Ice.IncomingAsync.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Ice/IncomingAsync.cpp        2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Ice/IncomingAsync.cpp     2012-03-04 20:14:52.000000000 +0100
     3@@ -24,7 +24,7 @@
     4 using namespace IceInternal;
     5 
     6 IceUtil::Shared* IceInternal::upCast(IncomingAsync* p) { return p; }
     7-IceUtil::Shared* IceInternal::upCast(AMD_Object_ice_invoke* p) { return p; }
     8+IceUtil::Shared* Ice::upCast(AMD_Object_ice_invoke* p) { return p; }
     9 
     10 namespace
     11 {
  • files/patch-ice.cpp.src.Ice.LocalObject.cpp.diff

    diff -urN files/patch-ice.cpp.src.Ice.LocalObject.cpp.diff.orig files/patch-ice.cpp.src.Ice.LocalObject.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Ice/LocalObject.cpp  2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Ice/LocalObject.cpp       2012-03-04 20:14:52.000000000 +0100
     3@@ -13,7 +13,7 @@
     4 using namespace Ice;
     5 using namespace IceInternal;
     6 
     7-IceUtil::Shared* IceInternal::upCast(LocalObject* obj) { return obj; }
     8+IceUtil::Shared* Ice::upCast(LocalObject* obj) { return obj; }
     9 
     10 bool
     11 Ice::LocalObject::operator==(const LocalObject& r) const
  • files/patch-ice.cpp.src.Ice.Network.cpp.diff

    diff -urN files/patch-ice.cpp.src.Ice.Network.cpp.diff.orig files/patch-ice.cpp.src.Ice.Network.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Ice/Network.cpp      2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Ice/Network.cpp   2011-07-15 23:40:26.000000000 +0200
     3@@ -715,7 +715,11 @@
     4     WSASetLastError(error);
     5 #else
     6     int error = errno;
     7-    if(close(fd) == SOCKET_ERROR)
     8+    if(close(fd) == SOCKET_ERROR
     9+#  if defined(__FreeBSD__)
     10+    && getSocketErrno() != ECONNRESET
     11+#  endif
     12+    )
     13     {
     14         SocketException ex(__FILE__, __LINE__);
     15         ex.error = getSocketErrno();
  • files/patch-ice.cpp.src.Ice.Object.cpp.diff

    diff -urN files/patch-ice.cpp.src.Ice.Object.cpp.diff.orig files/patch-ice.cpp.src.Ice.Object.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Ice/Object.cpp       2011-06-15 21:43:58.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Ice/Object.cpp    2012-03-04 20:14:52.000000000 +0100
     3@@ -19,7 +19,7 @@
     4 using namespace Ice;
     5 using namespace IceInternal;
     6 
     7-IceUtil::Shared* IceInternal::upCast(Object* p) { return p; }
     8+IceUtil::Shared* Ice::upCast(Object* p) { return p; }
     9 
     10 bool
     11 Ice::Object::operator==(const Object& r) const
  • files/patch-ice.cpp.src.Ice.OutgoingAsync.cpp.diff

    diff -urN files/patch-ice.cpp.src.Ice.OutgoingAsync.cpp.diff.orig files/patch-ice.cpp.src.Ice.OutgoingAsync.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Ice/OutgoingAsync.cpp        2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Ice/OutgoingAsync.cpp     2012-03-04 20:14:52.000000000 +0100
     3@@ -30,7 +30,7 @@
     4 using namespace Ice;
     5 using namespace IceInternal;
     6 
     7-IceUtil::Shared* IceInternal::upCast(AsyncResult* p) { return p; }
     8+IceUtil::Shared* Ice::upCast(AsyncResult* p) { return p; }
     9 
     10 IceUtil::Shared* IceInternal::upCast(OutgoingAsyncMessageCallback* p) { return p; }
     11 IceUtil::Shared* IceInternal::upCast(OutgoingAsync* p) { return p; }
  • files/patch-ice.cpp.src.Ice.PropertyNames.cpp.diff

    diff -urN files/patch-ice.cpp.src.Ice.PropertyNames.cpp.diff.orig files/patch-ice.cpp.src.Ice.PropertyNames.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Ice/PropertyNames.cpp        2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Ice/PropertyNames.cpp     2012-03-04 19:55:44.000000000 +0100
     3@@ -8,7 +8,7 @@
     4 // **********************************************************************
     5 
     6 //
     7-// Generated by makeprops.py from file ..\config\PropertyNames.xml, Mon May 09 07:39:43 2011
     8+// Generated by makeprops.py from file ../config/PropertyNames.xml, Tue Jul 12 07:22:34 2011
     9 
     10 // IMPORTANT: Do not edit this file -- any edits made here will be lost!
     11 
     12@@ -335,6 +335,8 @@
     13     IceInternal::Property("IceGrid.Registry.PermissionsVerifier", false, 0),
     14     IceInternal::Property("IceGrid.Registry.ReplicaName", false, 0),
     15     IceInternal::Property("IceGrid.Registry.ReplicaSessionTimeout", false, 0),
     16+    IceInternal::Property("IceGrid.Registry.RequireNodeCertCN", false, 0),
     17+    IceInternal::Property("IceGrid.Registry.RequireReplicaCertCN", false, 0),
     18     IceInternal::Property("IceGrid.Registry.Server.ACM", false, 0),
     19     IceInternal::Property("IceGrid.Registry.Server.AdapterId", false, 0),
     20     IceInternal::Property("IceGrid.Registry.Server.Endpoints", false, 0),
  • files/patch-ice.cpp.src.Ice.PropertyNames.h.diff

    diff -urN files/patch-ice.cpp.src.Ice.PropertyNames.h.diff.orig files/patch-ice.cpp.src.Ice.PropertyNames.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Ice/PropertyNames.h  2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Ice/PropertyNames.h       2012-03-04 19:55:44.000000000 +0100
     3@@ -8,7 +8,7 @@
     4 // **********************************************************************
     5 
     6 //
     7-// Generated by makeprops.py from file ..\config\PropertyNames.xml, Mon May 09 07:39:43 2011
     8+// Generated by makeprops.py from file ../config/PropertyNames.xml, Tue Jul 12 07:22:34 2011
     9 
     10 // IMPORTANT: Do not edit this file -- any edits made here will be lost!
     11 
  • files/patch-ice.cpp.src.Ice.ProxyFactory.cpp.diff

    diff -urN files/patch-ice.cpp.src.Ice.ProxyFactory.cpp.diff.orig files/patch-ice.cpp.src.Ice.ProxyFactory.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Ice/ProxyFactory.cpp 2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Ice/ProxyFactory.cpp      2012-03-04 20:14:53.000000000 +0100
     3@@ -229,6 +229,7 @@
     4     }
     5     else if(cnt > static_cast<int>(_retryIntervals.size()))
     6     {
     7+        interval = 0; // apeace compiler
     8         if(traceLevels->retry >= 1)
     9         {
     10             Trace out(logger, traceLevels->retryCat);
  • files/patch-ice.cpp.src.Ice.Service.cpp.diff

    diff -urN files/patch-ice.cpp.src.Ice.Service.cpp.diff.orig files/patch-ice.cpp.src.Ice.Service.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Ice/Service.cpp      2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Ice/Service.cpp   2012-03-04 20:14:53.000000000 +0100
     3@@ -2136,17 +2136,26 @@
     4             //
     5             // Associate stdin, stdout and stderr with /dev/null.
     6             //
     7+#ifndef NDEBUG
     8             int fd;
     9-            fd = open("/dev/null", O_RDWR);
     10+            fd =
     11+#endif
     12+            open("/dev/null", O_RDWR);
     13             assert(fd == 0);
     14             if(stdOut.empty())
     15             {
     16-                fd = dup2(0, 1);
     17+#ifndef NDEBUG
     18+                fd =
     19+#endif
     20+                dup2(0, 1);
     21                 assert(fd == 1);
     22             }
     23             if(stdErr.empty())
     24             {
     25-                fd = dup2(1, 2);
     26+#ifndef NDEBUG
     27+                fd =
     28+#endif
     29+                dup2(1, 2);
     30                 assert(fd == 2);
     31             }
     32         }
  • files/patch-ice.cpp.src.Ice.Stream.cpp.diff

    diff -urN files/patch-ice.cpp.src.Ice.Stream.cpp.diff.orig files/patch-ice.cpp.src.Ice.Stream.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Ice/Stream.cpp       2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Ice/Stream.cpp    2012-03-04 20:14:53.000000000 +0100
     3@@ -8,10 +8,19 @@
     4 // **********************************************************************
     5 
     6 #include <Ice/Stream.h>
     7+#include <Ice/LocalException.h>
     8 
     9 using namespace std;
     10 using namespace Ice;
     11 using namespace IceInternal;
     12 
     13-IceUtil::Shared* IceInternal::upCast(InputStream* p) { return p; }
     14-IceUtil::Shared* IceInternal::upCast(OutputStream* p) { return p; }
     15+IceUtil::Shared* Ice::upCast(InputStream* p) { return p; }
     16+IceUtil::Shared* Ice::upCast(OutputStream* p) { return p; }
     17+
     18+namespace IceInternal
     19+{
     20+  void delegateThrowMarshalException(const char* file, int line , const ::std::string& message)
     21+  {
     22+    throw Ice::MarshalException(file, line, message);
     23+  }
     24+}
  • files/patch-ice.cpp.src.IceGrid.AdminCallbackRouter.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceGrid.AdminCallbackRouter.cpp.diff.orig files/patch-ice.cpp.src.IceGrid.AdminCallbackRouter.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceGrid/AdminCallbackRouter.cpp      2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceGrid/AdminCallbackRouter.cpp   2012-03-04 20:14:53.000000000 +0100
     3@@ -49,7 +49,12 @@
     4 #ifndef NDEBUG
     5     bool inserted =
     6 #endif
     7-        _categoryToConnection.insert(map<string, ConnectionPtr>::value_type(category, con)).second;
     8+        _categoryToConnection.insert(map<string, ConnectionPtr>::value_type(category, con))
     9+#ifndef NDEBUG
     10+        .second
     11+#endif
     12+        ;
     13+
     14     
     15     assert(inserted == true);
     16 }
  • files/patch-ice.cpp.src.IceGrid.DescriptorHelper.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceGrid.DescriptorHelper.cpp.diff.orig files/patch-ice.cpp.src.IceGrid.DescriptorHelper.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceGrid/DescriptorHelper.cpp 2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceGrid/DescriptorHelper.cpp      2012-03-04 20:14:53.000000000 +0100
     3@@ -198,15 +198,6 @@
     4     return result;
     5 }
     6 
     7-template<typename Dict> Dict
     8-getDictUpdatedElts(const Dict& ldict, const Dict& rdict)
     9-{
     10-#if defined(_MSC_VER) && (_MSC_VER < 1300)
     11-    return getDictUpdatedEltsWithEq(ldict, rdict, equal_to<Dict::mapped_type>());
     12-#else
     13-    return getDictUpdatedEltsWithEq(ldict, rdict, equal_to<typename Dict::mapped_type>());
     14-#endif
     15-}
     16 
     17 template<typename EqFunc, typename Dict> Dict
     18 getDictUpdatedEltsWithEq(const Dict& ldict, const Dict& rdict, EqFunc eq)
     19@@ -223,6 +214,16 @@
     20     return result;
     21 }
     22 
     23+template<typename Dict> Dict
     24+getDictUpdatedElts(const Dict& ldict, const Dict& rdict)
     25+{
     26+#if defined(_MSC_VER) && (_MSC_VER < 1300)
     27+    return getDictUpdatedEltsWithEq(ldict, rdict, equal_to<Dict::mapped_type>());
     28+#else
     29+    return getDictUpdatedEltsWithEq(ldict, rdict, equal_to<typename Dict::mapped_type>());
     30+#endif
     31+}
     32+
     33 template <typename Dict> Ice::StringSeq
     34 getDictRemovedElts(const Dict& ldict, const Dict& rdict)
     35 {
  • files/patch-ice.cpp.src.IceGrid.Internal.ice.diff

    diff -urN files/patch-ice.cpp.src.IceGrid.Internal.ice.diff.orig files/patch-ice.cpp.src.IceGrid.Internal.ice.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceGrid/Internal.ice 2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceGrid/Internal.ice      2012-03-04 19:55:44.000000000 +0100
     3@@ -702,7 +702,7 @@
     4      *
     5      **/
     6     NodeSession* registerNode(InternalNodeInfo info, Node* prx, LoadInfo loadInf)
     7-        throws NodeActiveException;
     8+        throws NodeActiveException, PermissionDeniedException;
     9 
     10     /**
     11      *
     12@@ -721,7 +721,7 @@
     13      *
     14      **/
     15     ReplicaSession* registerReplica(InternalReplicaInfo info, InternalRegistry* prx)
     16-        throws ReplicaActiveException;
     17+        throws ReplicaActiveException, PermissionDeniedException;
     18 
     19     /**
     20      *
  • files/patch-ice.cpp.src.IceGrid.InternalRegistryI.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceGrid.InternalRegistryI.cpp.diff.orig files/patch-ice.cpp.src.IceGrid.InternalRegistryI.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceGrid/InternalRegistryI.cpp        2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceGrid/InternalRegistryI.cpp     2012-03-04 19:55:44.000000000 +0100
     3@@ -19,6 +19,8 @@
     4 #include <IceGrid/ReplicaSessionI.h>
     5 #include <IceGrid/ReplicaSessionManager.h>
     6 #include <IceGrid/FileCache.h>
     7+#include <IceSSL/IceSSL.h>
     8+#include <IceSSL/RFC2253.h>
     9 
     10 using namespace std;
     11 using namespace IceGrid;
     12@@ -38,6 +40,8 @@
     13     Ice::PropertiesPtr properties = database->getCommunicator()->getProperties();
     14     _nodeSessionTimeout = properties->getPropertyAsIntWithDefault("IceGrid.Registry.NodeSessionTimeout", 30);
     15     _replicaSessionTimeout = properties->getPropertyAsIntWithDefault("IceGrid.Registry.ReplicaSessionTimeout", 30);
     16+    _requireNodeCertCN = properties->getPropertyAsIntWithDefault("IceGrid.Registry.RequireNodeCertCN", 0);
     17+    _requireReplicaCertCN = properties->getPropertyAsIntWithDefault("IceGrid.Registry.RequireReplicaCertCN", 0);
     18 }
     19 
     20 InternalRegistryI::~InternalRegistryI()
     21@@ -50,7 +54,56 @@
     22                                 const LoadInfo& load,
     23                                 const Ice::Current& current)
     24 {
     25-    const Ice::LoggerPtr logger = _database->getTraceLevels()->logger;
     26+    const TraceLevelsPtr traceLevels = _database->getTraceLevels();
     27+    const Ice::LoggerPtr logger = traceLevels->logger;
     28+    if(!info || !node)
     29+    {
     30+        return 0;
     31+    }
     32+
     33+    if(_requireNodeCertCN)
     34+    {
     35+        try
     36+        {
     37+            IceSSL::ConnectionInfoPtr sslConnInfo = IceSSL::ConnectionInfoPtr::dynamicCast(current.con->getInfo());
     38+            if(sslConnInfo)
     39+            {
     40+                if (sslConnInfo->certs.empty() ||
     41+                    !IceSSL::Certificate::decode(sslConnInfo->certs[0])->getSubjectDN().match("CN=" + info->name))
     42+                {
     43+                    if(traceLevels->node > 0)
     44+                    {
     45+                        Ice::Trace out(logger, traceLevels->nodeCat);
     46+                        out << "certificate CN doesn't match node name `" << info->name << "'";
     47+                    }
     48+                    throw PermissionDeniedException("certificate CN doesn't match node name `" + info->name + "'");
     49+                }
     50+            }
     51+            else
     52+            {
     53+                if(traceLevels->node > 0)
     54+                {
     55+                    Ice::Trace out(logger, traceLevels->nodeCat);
     56+                    out << "node certificate for `" << info->name << "' is required to connect to this registry";
     57+                }
     58+                throw PermissionDeniedException("node certificate is required to connect to this registry");
     59+            }
     60+        }
     61+        catch(const PermissionDeniedException& ex)
     62+        {
     63+            throw ex;
     64+        }
     65+        catch(const IceUtil::Exception&)
     66+        {
     67+            if(traceLevels->node > 0)
     68+            {
     69+                Ice::Trace out(logger, traceLevels->nodeCat);
     70+                out << "unexpected exception while verifying certificate for node `" << info->name << "'";
     71+            }
     72+            throw PermissionDeniedException("unable to verify certificate for node `" + info->name + "'");
     73+        }
     74+    }
     75+
     76     try
     77     {
     78         NodeSessionIPtr session = new NodeSessionI(_database, node, info, _nodeSessionTimeout, load);
     79@@ -68,7 +121,56 @@
     80                                    const InternalRegistryPrx& prx,
     81                                    const Ice::Current& current)
     82 {
     83-    const Ice::LoggerPtr logger = _database->getTraceLevels()->logger;
     84+    const TraceLevelsPtr traceLevels = _database->getTraceLevels();
     85+    const Ice::LoggerPtr logger = traceLevels->logger;
     86+    if(!info || !prx)
     87+    {
     88+        return 0;
     89+    }
     90+
     91+    if(_requireReplicaCertCN)
     92+    {
     93+        try
     94+        {
     95+            IceSSL::ConnectionInfoPtr sslConnInfo = IceSSL::ConnectionInfoPtr::dynamicCast(current.con->getInfo());
     96+            if(sslConnInfo)
     97+            {
     98+                if (sslConnInfo->certs.empty() ||
     99+                    !IceSSL::Certificate::decode(sslConnInfo->certs[0])->getSubjectDN().match("CN=" + info->name))
     100+                {
     101+                    if(traceLevels->replica > 0)
     102+                    {
     103+                        Ice::Trace out(logger, traceLevels->replicaCat);
     104+                        out << "certificate CN doesn't match replica name `" << info->name << "'";
     105+                    }
     106+                    throw PermissionDeniedException("certificate CN doesn't match replica name `" + info->name + "'");
     107+                }
     108+            }
     109+            else
     110+            {
     111+                if(traceLevels->replica > 0)
     112+                {
     113+                    Ice::Trace out(logger, traceLevels->replicaCat);
     114+                    out << "replica certificate for `" << info->name << "' is required to connect to this registry";
     115+                }
     116+                throw PermissionDeniedException("replica certificate is required to connect to this registry");
     117+            }
     118+        }
     119+        catch(const PermissionDeniedException& ex)
     120+        {
     121+            throw ex;
     122+        }
     123+        catch(const IceUtil::Exception&)
     124+        {
     125+            if(traceLevels->replica > 0)
     126+            {
     127+                Ice::Trace out(logger, traceLevels->replicaCat);
     128+                out << "unexpected exception while verifying certificate for replica `" << info->name << "'";
     129+            }
     130+            throw PermissionDeniedException("unable to verify certificate for replica `" + info->name + "'");
     131+        }
     132+    }
     133+   
     134     try
     135     {
     136         ReplicaSessionIPtr s = new ReplicaSessionI(_database, _wellKnownObjects, info, prx, _replicaSessionTimeout);
  • files/patch-ice.cpp.src.IceGrid.InternalRegistryI.h.diff

    diff -urN files/patch-ice.cpp.src.IceGrid.InternalRegistryI.h.diff.orig files/patch-ice.cpp.src.IceGrid.InternalRegistryI.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceGrid/InternalRegistryI.h  2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceGrid/InternalRegistryI.h       2012-03-04 19:55:44.000000000 +0100
     3@@ -68,6 +68,8 @@
     4     ReplicaSessionManager& _session;
     5     int _nodeSessionTimeout;
     6     int _replicaSessionTimeout;
     7+    bool _requireNodeCertCN;
     8+    bool _requireReplicaCertCN;
     9 };
     10     
     11 };
  • files/patch-ice.cpp.src.IceGrid.NodeSessionManager.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceGrid.NodeSessionManager.cpp.diff.orig files/patch-ice.cpp.src.IceGrid.NodeSessionManager.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceGrid/NodeSessionManager.cpp       2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceGrid/NodeSessionManager.cpp    2012-03-04 19:55:44.000000000 +0100
     3@@ -110,6 +110,14 @@
     4         }
     5         exception.reset(ex.ice_clone());
     6     }
     7+    catch(const PermissionDeniedException& ex)
     8+    {
     9+        if(traceLevels)
     10+        {
     11+            traceLevels->logger->error("connection to the the registry `" + _name + "' was denied:\n" + ex.reason);
     12+        }
     13+        exception.reset(ex.ice_clone());
     14+    }
     15     catch(const Ice::Exception& ex)
     16     {
     17         exception.reset(ex.ice_clone());
  • files/patch-ice.cpp.src.IceGrid.ReplicaCache.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceGrid.ReplicaCache.cpp.diff.orig files/patch-ice.cpp.src.IceGrid.ReplicaCache.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceGrid/ReplicaCache.cpp     2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceGrid/ReplicaCache.cpp  2012-03-04 20:14:53.000000000 +0100
     3@@ -40,7 +40,7 @@
     4     Lock sync(*this);
     5     
     6     ReplicaEntryPtr entry;
     7-    while(entry = getImpl(name))
     8+    while((entry = getImpl(name)))
     9     {
     10         ReplicaSessionIPtr session = entry->getSession();
     11         if(session->isDestroyed())
  • files/patch-ice.cpp.src.IceGrid.ReplicaSessionManager.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceGrid.ReplicaSessionManager.cpp.diff.orig files/patch-ice.cpp.src.IceGrid.ReplicaSessionManager.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceGrid/ReplicaSessionManager.cpp    2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceGrid/ReplicaSessionManager.cpp 2012-03-04 19:55:44.000000000 +0100
     3@@ -500,6 +500,14 @@
     4         }
     5         exception.reset(ex.ice_clone());
     6     }
     7+    catch(const PermissionDeniedException& ex)
     8+    {
     9+        if(_traceLevels)
     10+        {
     11+            _traceLevels->logger->error("connection to the the registry `" + _name + "' was denied:\n" + ex.reason);
     12+        }
     13+        exception.reset(ex.ice_clone());
     14+    }
     15     catch(const Ice::Exception& ex)
     16     {
     17         exception.reset(ex.ice_clone());
  • files/patch-ice.cpp.src.IceGrid.SessionI.h.diff

    diff -urN files/patch-ice.cpp.src.IceGrid.SessionI.h.diff.orig files/patch-ice.cpp.src.IceGrid.SessionI.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceGrid/SessionI.h   2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceGrid/SessionI.h        2012-03-04 20:14:53.000000000 +0100
     3@@ -35,7 +35,7 @@
     4 class SessionI;
     5 typedef IceUtil::Handle<SessionI> SessionIPtr;
     6 
     7-class BaseSessionI : virtual Ice::Object, public IceUtil::Mutex
     8+class BaseSessionI : virtual public Ice::Object, public IceUtil::Mutex
     9 {
     10 public:
     11 
  • files/patch-ice.cpp.src.IceSSL.Instance.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceSSL.Instance.cpp.diff.orig files/patch-ice.cpp.src.IceSSL.Instance.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceSSL/Instance.cpp  2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceSSL/Instance.cpp       2012-03-04 20:14:53.000000000 +0100
     3@@ -38,7 +38,7 @@
     4 using namespace Ice;
     5 using namespace IceSSL;
     6 
     7-IceUtil::Shared* IceInternal::upCast(IceSSL::Instance* p) { return p; }
     8+IceUtil::Shared* IceSSL::upCast(IceSSL::Instance* p) { return p; }
     9 
     10 namespace
     11 {
  • files/patch-ice.cpp.src.IceSSL.InstanceF.h.diff

    diff -urN files/patch-ice.cpp.src.IceSSL.InstanceF.h.diff.orig files/patch-ice.cpp.src.IceSSL.InstanceF.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceSSL/InstanceF.h   2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceSSL/InstanceF.h        2012-03-04 20:14:53.000000000 +0100
     3@@ -18,13 +18,13 @@
     4 {
     5 
     6 class Instance;
     7+IceUtil::Shared* upCast(IceSSL::Instance*);
     8 
     9 }
     10 
     11 namespace IceInternal
     12 {
     13 
     14-IceUtil::Shared* upCast(IceSSL::Instance*);
     15 
     16 }
     17 
  • files/patch-ice.cpp.src.IceSSL.TrustManager.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceSSL.TrustManager.cpp.diff.orig files/patch-ice.cpp.src.IceSSL.TrustManager.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceSSL/TrustManager.cpp      2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceSSL/TrustManager.cpp   2012-03-04 20:14:53.000000000 +0100
     3@@ -20,7 +20,7 @@
     4 using namespace std;
     5 using namespace IceSSL;
     6 
     7-IceUtil::Shared* IceInternal::upCast(IceSSL::TrustManager* p) { return p; }
     8+IceUtil::Shared* IceSSL::upCast(IceSSL::TrustManager* p) { return p; }
     9 
     10 TrustManager::TrustManager(const Ice::CommunicatorPtr& communicator) :
     11     _communicator(communicator)
  • files/patch-ice.cpp.src.IceSSL.TrustManagerF.h.diff

    diff -urN files/patch-ice.cpp.src.IceSSL.TrustManagerF.h.diff.orig files/patch-ice.cpp.src.IceSSL.TrustManagerF.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceSSL/TrustManagerF.h       2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceSSL/TrustManagerF.h    2012-03-04 20:14:53.000000000 +0100
     3@@ -18,13 +18,13 @@
     4 {
     5 
     6 class TrustManager;
     7+IceUtil::Shared* upCast(IceSSL::TrustManager*);
     8 
     9 }
     10 
     11 namespace IceInternal
     12 {
     13 
     14-IceUtil::Shared* upCast(IceSSL::TrustManager*);
     15 
     16 }
     17 
  • files/patch-ice.cpp.src.IceSSL.Util.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceSSL.Util.cpp.diff.orig files/patch-ice.cpp.src.IceSSL.Util.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceSSL/Util.cpp      2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceSSL/Util.cpp   2012-03-04 20:14:53.000000000 +0100
     3@@ -175,7 +175,7 @@
     4     return dh;
     5 }
     6 
     7-IceUtil::Shared* IceInternal::upCast(IceSSL::DHParams* p) { return p; }
     8+IceUtil::Shared* IceSSL::upCast(IceSSL::DHParams* p) { return p; }
     9 
     10 IceSSL::DHParams::DHParams() :
     11     _dh512(0), _dh1024(0), _dh2048(0), _dh4096(0)
  • files/patch-ice.cpp.src.IceSSL.UtilF.h.diff

    diff -urN files/patch-ice.cpp.src.IceSSL.UtilF.h.diff.orig files/patch-ice.cpp.src.IceSSL.UtilF.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceSSL/UtilF.h       2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceSSL/UtilF.h    2012-03-04 20:14:53.000000000 +0100
     3@@ -21,13 +21,13 @@
     4 {
     5 
     6 class DHParams;
     7+IceUtil::Shared* upCast(IceSSL::DHParams*);
     8 
     9 }
     10 
     11 namespace IceInternal
     12 {
     13 
     14-IceUtil::Shared* upCast(IceSSL::DHParams*);
     15 
     16 }
     17 
  • files/patch-ice.cpp.src.IceStorm.NodeI.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceStorm.NodeI.cpp.diff.orig files/patch-ice.cpp.src.IceStorm.NodeI.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceStorm/NodeI.cpp   2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceStorm/NodeI.cpp        2012-03-04 20:14:53.000000000 +0100
     3@@ -18,11 +18,6 @@
     4 namespace
     5 {
     6 
     7-bool operator==(const GroupNodeInfo& info, int id)
     8-{
     9-    return info.id == id;
     10-}
     11-
     12 class CheckTask : public IceUtil::TimerTask
     13 {
     14     const NodeIPtr _node;
  • files/patch-ice.cpp.src.IceUtil.Cond.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceUtil.Cond.cpp.diff.orig files/patch-ice.cpp.src.IceUtil.Cond.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceUtil/Cond.cpp     2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceUtil/Cond.cpp  2012-03-04 20:14:53.000000000 +0100
     3@@ -330,8 +330,11 @@
     4 
     5 IceUtil::Cond::~Cond()
     6 {
     7+#ifndef NDEBUG
     8     int rc = 0;
     9-    rc = pthread_cond_destroy(&_cond);
     10+    rc =
     11+#endif
     12+    pthread_cond_destroy(&_cond);
     13     assert(rc == 0);
     14 }
     15 
  • files/patch-ice.cpp.src.IceUtil.CountDownLatch.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceUtil.CountDownLatch.cpp.diff.orig files/patch-ice.cpp.src.IceUtil.CountDownLatch.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceUtil/CountDownLatch.cpp   2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceUtil/CountDownLatch.cpp        2012-03-04 20:14:53.000000000 +0100
     3@@ -44,10 +44,16 @@
     4 #ifdef _WIN32
     5     CloseHandle(_event);
     6 #else
     7+#ifndef NDEBUG
     8     int rc = 0;
     9-    rc = pthread_mutex_destroy(&_mutex);
     10+    rc =
     11+#endif
     12+    pthread_mutex_destroy(&_mutex);
     13     assert(rc == 0);
     14-    rc = pthread_cond_destroy(&_cond);
     15+#ifndef NDEBUG
     16+    rc =
     17+#endif
     18+    pthread_cond_destroy(&_cond);
     19     assert(rc == 0);
     20 #endif
     21 }
  • files/patch-ice.cpp.src.IceUtil.CtrlCHandler.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceUtil.CtrlCHandler.cpp.diff.orig files/patch-ice.cpp.src.IceUtil.CtrlCHandler.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceUtil/CtrlCHandler.cpp     2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceUtil/CtrlCHandler.cpp  2012-03-04 20:14:53.000000000 +0100
     3@@ -219,29 +219,41 @@
     4         sigaddset(&ctrlCLikeSignals, SIGHUP);
     5         sigaddset(&ctrlCLikeSignals, SIGINT);
     6         sigaddset(&ctrlCLikeSignals, SIGTERM);
     7-        int rc = pthread_sigmask(SIG_BLOCK, &ctrlCLikeSignals, 0);
     8+#ifndef NDEBUG
     9+        int rc =
     10+#endif       
     11+        pthread_sigmask(SIG_BLOCK, &ctrlCLikeSignals, 0);
     12         assert(rc == 0);
     13 
     14         // Joinable thread
     15-        rc = pthread_create(&_tid, 0, sigwaitThread, 0);
     16+#ifndef NDEBUG
     17+        rc =
     18+#endif
     19+        pthread_create(&_tid, 0, sigwaitThread, 0);
     20         assert(rc == 0);
     21     }
     22 }
     23 
     24 CtrlCHandler::~CtrlCHandler()
     25 {
     26-    int rc = pthread_cancel(_tid);
     27+#ifndef NDEBUG
     28+    int rc =
     29+#endif
     30+    pthread_cancel(_tid);
     31     assert(rc == 0);
     32 #if defined(__APPLE__)
     33     //
     34     // WORKAROUND: sigwait isn't a cancellation point on MacOS X, see
     35     // comment in sigwaitThread
     36     //
     37-    rc = pthread_kill(_tid, SIGTERM);
     38+    pthread_kill(_tid, SIGTERM);
     39     //assert(rc == 0); For some reaosns, this assert is sometime triggered
     40 #endif
     41     void* status = 0;
     42-    rc = pthread_join(_tid, &status);
     43+#ifndef NDEBUG
     44+    rc =
     45+#endif
     46+    pthread_join(_tid, &status);
     47     assert(rc == 0);
     48 #if !defined(__APPLE__)
     49     assert(status == PTHREAD_CANCELED);
  • files/patch-ice.cpp.src.IceUtil.FileUtil.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceUtil.FileUtil.cpp.diff.orig files/patch-ice.cpp.src.IceUtil.FileUtil.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceUtil/FileUtil.cpp 2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceUtil/FileUtil.cpp      2012-03-04 20:14:53.000000000 +0100
     3@@ -26,6 +26,10 @@
     4 #  include <dir.h>
     5 #endif
     6 
     7+#ifdef __FreeBSD__
     8+#  include <unistd.h>
     9+#endif
     10+
     11 using namespace std;
     12 
     13 //
  • files/patch-ice.cpp.src.IceUtil.RecMutex.cpp.diff

    diff -urN files/patch-ice.cpp.src.IceUtil.RecMutex.cpp.diff.orig files/patch-ice.cpp.src.IceUtil.RecMutex.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/IceUtil/RecMutex.cpp 2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/IceUtil/RecMutex.cpp      2012-03-04 20:14:53.000000000 +0100
     3@@ -148,8 +148,11 @@
     4 IceUtil::RecMutex::~RecMutex()
     5 {
     6     assert(_count == 0);
     7+#ifndef NDEBUG
     8     int rc = 0;
     9-    rc = pthread_mutex_destroy(&_mutex);
     10+    rc =
     11+#endif
     12+    pthread_mutex_destroy(&_mutex);
     13     assert(rc == 0);
     14 }
     15 
     16@@ -196,8 +199,11 @@
     17 {
     18     if(--_count == 0)
     19     {
     20+#ifndef NDEBUG
     21         int rc = 0; // Prevent warnings when NDEBUG is defined.
     22-        rc = pthread_mutex_unlock(&_mutex);
     23+        rc =
     24+#endif
     25+        pthread_mutex_unlock(&_mutex);
     26         assert(rc == 0);
     27     }
     28 }
  • files/patch-ice.cpp.src.Slice.CPlusPlusUtil.cpp.diff

    diff -urN files/patch-ice.cpp.src.Slice.CPlusPlusUtil.cpp.diff.orig files/patch-ice.cpp.src.Slice.CPlusPlusUtil.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Slice/CPlusPlusUtil.cpp      2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Slice/CPlusPlusUtil.cpp   2012-03-04 20:14:53.000000000 +0100
     3@@ -631,7 +631,7 @@
     4         string scope = fixKwd(cl->scope());
     5         if(marshal)
     6         {
     7-            out << nl << stream << deref << "write(::Ice::ObjectPtr(::IceInternal::upCast(" << fixedParam
     8+            out << nl << stream << deref << "write(::Ice::ObjectPtr(" << scope << "upCast(" << fixedParam
     9                 << ".get())));";
     10         }
     11         else
     12@@ -649,7 +649,7 @@
     13         string scope = fixKwd(px->_class()->scope());
     14         if(marshal)
     15         {
     16-            out << nl << stream << deref << "write(::Ice::ObjectPrx(::IceInternal::upCast(" << fixedParam
     17+            out << nl << stream << deref << "write(::Ice::ObjectPrx(::IceProxy" << scope << "upCast(" << fixedParam
     18                 << ".get())));";
     19         }
     20         else
  • files/patch-ice.cpp.src.Slice.FileTracker.cpp.diff

    diff -urN files/patch-ice.cpp.src.Slice.FileTracker.cpp.diff.orig files/patch-ice.cpp.src.Slice.FileTracker.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/Slice/FileTracker.cpp        2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/Slice/FileTracker.cpp     2012-03-04 20:14:53.000000000 +0100
     3@@ -17,6 +17,10 @@
     4 #   include <direct.h>
     5 #endif
     6 
     7+#ifdef __FreeBSD__
     8+#   include <unistd.h>
     9+#endif
     10+
     11 using namespace std;
     12 
     13 Slice::FileException::FileException(const char* file, int line, const string& r) :
  • files/patch-ice.cpp.src.slice2cpp.Gen.cpp.diff

    diff -urN files/patch-ice.cpp.src.slice2cpp.Gen.cpp.diff.orig files/patch-ice.cpp.src.slice2cpp.Gen.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/slice2cpp/Gen.cpp    2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/slice2cpp/Gen.cpp 2012-03-04 20:14:53.000000000 +0100
     3@@ -1944,8 +1944,10 @@
     4     }
     5 
     6     string name = fixKwd(p->name());
     7+    string scoped = fixKwd(p->scoped());
     8 
     9     H << sp << nl << "class " << name << ';';
     10+    H << nl << _dllExport << "::IceProxy::Ice::Object* upCast(::IceProxy" << scoped << "*);";
     11 }
     12 
     13 Slice::Gen::ProxyVisitor::ProxyVisitor(Output& h, Output& c, const string& dllExport) :
     14@@ -3691,10 +3693,22 @@
     15 Slice::Gen::ObjectDeclVisitor::visitClassDecl(const ClassDeclPtr& p)
     16 {
     17     string name = fixKwd(p->name());
     18+    string scoped = fixKwd(p->scoped());
     19 
     20     H << sp << nl << "class " << name << ';';
     21     H << nl << "bool operator==(const " << name << "&, const " << name << "&);";
     22     H << nl << "bool operator<(const " << name << "&, const " << name << "&);";
     23+
     24+    H << sp;
     25+
     26+    if(!p->isLocal())
     27+    {
     28+        H << nl << _dllExport << "::Ice::Object* upCast(" << scoped << "*);";
     29+    }
     30+    else
     31+    {
     32+        H << nl << _dllExport << "::Ice::LocalObject* upCast(" << scoped << "*);";
     33+    }
     34 }
     35 
     36 void
     37@@ -4922,13 +4936,13 @@
     38 {
     39     if((BuiltinPtr::dynamicCast(p) && BuiltinPtr::dynamicCast(p)->kind() == Builtin::KindObject)
     40        || ClassDeclPtr::dynamicCast(p))
     41-    {
     42-        C << nl << "if(" << prefix << name << ')';
     43+    {        C << nl << "if(" << prefix << name << ')';
     44         C << sb;
     45         ClassDeclPtr decl = ClassDeclPtr::dynamicCast(p);
     46         if(decl)
     47         {
     48-            C << nl << "::IceInternal::upCast(" << prefix << name << ".get())->__addObject(_c);";
     49+            string scope = fixKwd(decl->scope());
     50+            C << nl << scope << "upCast(" << prefix << name << ".get())->__addObject(_c);";
     51         }
     52         else
     53         {
     54@@ -4991,9 +5005,10 @@
     55         ClassDeclPtr decl = ClassDeclPtr::dynamicCast(p);
     56         if(decl)
     57         {
     58-            C << nl << "if(" << "::IceInternal::upCast(" << prefix << name << ".get())->__usesClasses())";
     59+            string scope = fixKwd(decl->scope());
     60+            C << nl << "if(" << scope << "upCast(" << prefix << name << ".get())->__usesClasses())";
     61             C << sb;
     62-            C << nl << "::IceInternal::upCast(" << prefix << name << ".get())->__decRefUnsafe();";
     63+            C << nl << scope << "upCast(" << prefix << name << ".get())->__decRefUnsafe();";
     64             C << nl << prefix << name << ".__clearHandleUnsafe();";
     65 
     66         }
     67@@ -5629,40 +5644,30 @@
     68 {
     69     string scoped = fixKwd(p->scoped());
     70 
     71-    H << sp;
     72-
     73-    if(!p->isLocal())
     74-    {
     75-        H << nl << _dllExport << "::Ice::Object* upCast(" << scoped << "*);";
     76-        H << nl << _dllExport << "::IceProxy::Ice::Object* upCast(::IceProxy" << scoped << "*);";
     77-    }
     78-    else
     79-    {
     80-        H << nl << _dllExport << "::Ice::LocalObject* upCast(" << scoped << "*);";
     81-    }
     82 }
     83 
     84 bool
     85 Slice::Gen::IceInternalVisitor::visitClassDefStart(const ClassDefPtr& p)
     86 {
     87     string scoped = fixKwd(p->scoped());
     88+    string scope = fixKwd(p->scope());
     89 
     90     C << sp;
     91     if(!p->isLocal())
     92     {
     93         C << nl
     94          << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT ")
     95-         << "::Ice::Object* IceInternal::upCast(" << scoped << "* p) { return p; }";
     96+         << "::Ice::Object* " << scope << "upCast(" << scoped << "* p) { return p; }";
     97         C << nl
     98          << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT ")
     99-         << "::IceProxy::Ice::Object* IceInternal::upCast(::IceProxy" << scoped
     100+         << "::IceProxy::Ice::Object* IceProxy" << scope << "upCast(::IceProxy" << scoped
     101           << "* p) { return p; }";
     102     }
     103     else
     104     {
     105         C << nl
     106          << (_dllExport.empty() ? "" : "ICE_DECLSPEC_EXPORT ")
     107-         << "::Ice::LocalObject* IceInternal::upCast(" << scoped << "* p) { return p; }";
     108+         << "::Ice::LocalObject* " << scope << "upCast(" << scoped << "* p) { return p; }";
     109     }
     110 
     111     return true;
  • files/patch-ice.cpp.src.slice2cs.Gen.cpp.diff

    diff -urN files/patch-ice.cpp.src.slice2cs.Gen.cpp.diff.orig files/patch-ice.cpp.src.slice2cs.Gen.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/slice2cs/Gen.cpp     2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/slice2cs/Gen.cpp  2012-03-04 20:14:53.000000000 +0100
     3@@ -1281,7 +1281,7 @@
     4         {
     5             _out << value << "F";
     6         }
     7-        else if(ep = EnumPtr::dynamicCast(type))
     8+        else if((ep = EnumPtr::dynamicCast(type)))
     9         {
     10             string enumName = fixId(ep->scoped());
     11             string::size_type colon = value.rfind(':');
     12@@ -3914,16 +3914,6 @@
     13     ClassDefPtr cl = ClassDefPtr::dynamicCast(p->container());
     14     string name = fixId(p->name(), DotNet::ICloneable, true);
     15     vector<string> params = getParams(p);
     16-    bool hasOutParams = false;
     17-    ParamDeclList paramList = p->parameters();
     18-    for(ParamDeclList::const_iterator pli = paramList.begin(); pli != paramList.end(); ++pli)
     19-    {
     20-        if((*pli)->isOutParam())
     21-        {
     22-            hasOutParams = true;
     23-            break;
     24-        }
     25-    }
     26 
     27     _out << sp;
     28 
  • files/patch-ice.cpp.src.slice2java.Gen.cpp.diff

    diff -urN files/patch-ice.cpp.src.slice2java.Gen.cpp.diff.orig files/patch-ice.cpp.src.slice2java.Gen.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/src/slice2java/Gen.cpp   2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/src/slice2java/Gen.cpp        2012-03-04 20:14:53.000000000 +0100
     3@@ -1246,7 +1246,7 @@
     4     {
     5         BuiltinPtr bp;
     6         EnumPtr ep;
     7-        if(bp = BuiltinPtr::dynamicCast(type))
     8+        if((bp = BuiltinPtr::dynamicCast(type)))
     9         {
     10             switch(bp->kind())
     11             {
     12@@ -1349,7 +1349,7 @@
     13             }
     14 
     15         }
     16-        else if(ep = EnumPtr::dynamicCast(type))
     17+        else if((ep = EnumPtr::dynamicCast(type)))
     18         {
     19             string val = value;
     20             string::size_type pos = val.rfind(':');
  • files/patch-ice.cpp.test.Glacier2.ssl.Server.cpp.diff

    diff -urN files/patch-ice.cpp.test.Glacier2.ssl.Server.cpp.diff.orig files/patch-ice.cpp.test.Glacier2.ssl.Server.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/test/Glacier2/ssl/Server.cpp     2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/test/Glacier2/ssl/Server.cpp  2012-03-04 20:14:53.000000000 +0100
     3@@ -31,9 +31,15 @@
     4         test(ctx["_con.type"] == "ssl");
     5         test(ctx["_con.localPort"] == "12348");
     6     }
     7-    test(ctx["_con.localAddress"] == "127.0.0.1");
     8+    if (!inFreeBSDJail())
     9+    {
     10+        test(ctx["_con.localAddress"] == "127.0.0.1");
     11+    }
     12     test(ctx["_con.remotePort"] != "");
     13-    test(ctx["_con.remoteAddress"] == "127.0.0.1");
     14+    if (!inFreeBSDJail())
     15+    {
     16+        test(ctx["_con.remoteAddress"] == "127.0.0.1");
     17+    }
     18 }
     19 
     20 }
     21@@ -99,7 +105,7 @@
     22     }
     23 
     24     virtual void
     25-    ice_ping(const Ice::Current& current)
     26+    ice_ping(const Ice::Current& current) const
     27     {
     28         testContext(_ssl, current.ctx);
     29     }
     30@@ -133,8 +139,11 @@
     31     {
     32         testContext(true, current.ctx);
     33 
     34-        test(info.remoteHost == "127.0.0.1");
     35-        test(info.localHost == "127.0.0.1");
     36+        if (!inFreeBSDJail())
     37+        {
     38+            test(info.remoteHost == "127.0.0.1");
     39+            test(info.localHost == "127.0.0.1");
     40+        }
     41         test(info.localPort == 12348);
     42 
     43         try
  • files/patch-ice.cpp.test.Ice.background.EndpointI.h.diff

    diff -urN files/patch-ice.cpp.test.Ice.background.EndpointI.h.diff.orig files/patch-ice.cpp.test.Ice.background.EndpointI.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/test/Ice/background/EndpointI.h  2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/test/Ice/background/EndpointI.h       2012-03-04 20:14:53.000000000 +0100
     3@@ -48,7 +48,7 @@
     4 
     5     virtual Ice::Int hashInit() const;
     6 #if !defined(_MSC_VER) || _MSC_VER > 1300
     7-    using IceInternal::EndpointI::connectors;
     8+    using ::IceInternal::EndpointI::connectors;
     9 #endif
     10     
     11 private:
  • files/patch-ice.cpp.test.Ice.custom.AllTests.cpp.diff

    diff -urN files/patch-ice.cpp.test.Ice.custom.AllTests.cpp.diff.orig files/patch-ice.cpp.test.Ice.custom.AllTests.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/test/Ice/custom/AllTests.cpp     2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/test/Ice/custom/AllTests.cpp  2012-03-04 20:14:53.000000000 +0100
     3@@ -1384,7 +1384,8 @@
     4                        const ::Test::ClassStructSeq& seq,
     5                        const InParamPtr& cookie)
     6     {
     7-        pair< ::Test::ClassStructPtr, ::Test::ClassStructSeq> in = getIn(in, cookie);
     8+        pair< ::Test::ClassStructPtr, ::Test::ClassStructSeq> in;
     9+        in = getIn(in, cookie);
     10         test(ret == in.first);
     11         test(cs1 == in.first);
     12         test(seq == in.second);
     13@@ -1432,7 +1433,8 @@
     14 
     15     void throwExcept1(const Ice::AsyncResultPtr& result)
     16     {
     17-        wstring in = getIn(in, InParamPtr::dynamicCast(result->getCookie()));
     18+        wstring in;
     19+        in = getIn(in, InParamPtr::dynamicCast(result->getCookie()));
     20         try
     21         {
     22             Test1::WstringClassPrx t = Test1::WstringClassPrx::uncheckedCast(result->getProxy());
     23@@ -1451,7 +1453,8 @@
     24 
     25     void throwExcept2(const Ice::AsyncResultPtr& result)
     26     {
     27-        wstring in = getIn(in, InParamPtr::dynamicCast(result->getCookie()));
     28+        wstring in;
     29+        in = getIn(in, InParamPtr::dynamicCast(result->getCookie()));
     30         try
     31         {
     32             Test2::WstringClassPrx t = Test2::WstringClassPrx::uncheckedCast(result->getProxy());
  • files/patch-ice.cpp.test.Ice.info.AllTests.cpp.diff

    diff -urN files/patch-ice.cpp.test.Ice.info.AllTests.cpp.diff.orig files/patch-ice.cpp.test.Ice.info.AllTests.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/test/Ice/info/AllTests.cpp       2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/test/Ice/info/AllTests.cpp    2012-03-04 20:14:53.000000000 +0100
     3@@ -141,9 +141,11 @@
     4         test(info->adapterName.empty());
     5         test(info->localPort > 0);
     6         test(info->remotePort == 12010);
     7-        test(info->remoteAddress == defaultHost);
     8-        test(info->localAddress == defaultHost);
     9-
     10+        if (!inFreeBSDJail())
     11+        {
     12+            test(info->remoteAddress == defaultHost);
     13+            test(info->localAddress == defaultHost);
     14+        }
     15         ostringstream os;
     16 
     17         Ice::Context ctx = testIntf->getConnectionInfoAsContext();
     18@@ -163,8 +165,11 @@
     19         test(info->adapterName.empty());
     20         test(info->localPort > 0);
     21         test(info->remotePort == 12010);
     22-        test(info->remoteAddress ==defaultHost);
     23-        test(info->localAddress == defaultHost);
     24+        if (!inFreeBSDJail())
     25+        {
     26+            test(info->remoteAddress == defaultHost);
     27+            test(info->localAddress == defaultHost);
     28+        }
     29     }
     30     cout << "ok" << endl;
     31 
  • files/patch-ice.cpp.test.Ice.properties.run.py.diff

    diff -urN files/patch-ice.cpp.test.Ice.properties.run.py.diff.orig files/patch-ice.cpp.test.Ice.properties.run.py.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/test/Ice/properties/run.py       2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/test/Ice/properties/run.py    2012-03-04 20:14:53.000000000 +0100
     3@@ -26,7 +26,7 @@
     4 #
     5 # Write config
     6 #
     7-configPath = u"./config/中国_client.config"
     8+configPath = u"./config/中国_client.config".encode("utf-8")
     9 
     10 TestUtil.createConfig(configPath,
     11                       ["# Automatically generated by Ice test driver.",
     12@@ -38,4 +38,4 @@
     13 TestUtil.simpleTest(client)
     14 
     15 if os.path.exists(configPath):
     16-    os.remove(configPath)
     17\ No newline at end of file
     18+    os.remove(configPath)
  • files/patch-ice.cpp.test.IceUtil.unicode.Client.cpp.diff

    diff -urN files/patch-ice.cpp.test.IceUtil.unicode.Client.cpp.diff.orig files/patch-ice.cpp.test.IceUtil.unicode.Client.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/test/IceUtil/unicode/Client.cpp  2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/test/IceUtil/unicode/Client.cpp       2012-03-04 20:14:53.000000000 +0100
     3@@ -15,6 +15,10 @@
     4 #   include <io.h>
     5 #endif
     6 
     7+#ifdef __FreeBSD__
     8+#   include <unistd.h>
     9+#endif
     10+
     11 using namespace IceUtil;
     12 using namespace std;
     13 
  • files/patch-ice.cpp.test.Slice.keyword.Client.cpp.diff

    diff -urN files/patch-ice.cpp.test.Slice.keyword.Client.cpp.diff.orig files/patch-ice.cpp.test.Slice.keyword.Client.cpp.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/test/Slice/keyword/Client.cpp    2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/test/Slice/keyword/Client.cpp 2012-03-04 20:14:53.000000000 +0100
     3@@ -73,6 +73,9 @@
     4     virtual void ice_response(Ice::Int)  {}
     5     virtual void ice_exception(const ::Ice::Exception&) {}
     6 };
     7+
     8+template<typename T>
     9+void unused(T const &) { }
     10   
     11 //
     12 // This section of the test is present to ensure that the C++ types
     13@@ -86,6 +89,7 @@
     14 
     15     _cpp_and::_cpp_auto b;
     16     b._cpp_default = 0;
     17+    unused(b);
     18 
     19     _cpp_and::deletePtr c = new _cpp_and::_cpp_delete();
     20     c->_cpp_else = "";
  • files/patch-ice.cpp.test.include.TestCommon.h.diff

    diff -urN files/patch-ice.cpp.test.include.TestCommon.h.diff.orig files/patch-ice.cpp.test.include.TestCommon.h.diff
    old new  
     1--- Ice-3.4.2.orig/cpp/test/include/TestCommon.h        2011-06-15 21:43:59.000000000 +0200
     2+++ Ice-3.4.2/cpp/test/include/TestCommon.h     2012-03-04 20:14:53.000000000 +0100
     3@@ -17,6 +17,22 @@
     4 #include <stdlib.h>
     5 #endif
     6 
     7+#if defined(__FreeBSD__)
     8+#  include <sys/types.h>
     9+#  include <sys/sysctl.h>
     10+inline bool inFreeBSDJail()
     11+{
     12+    int jailed;
     13+    size_t size = sizeof(jailed);
     14+    return (sysctlbyname("security.jail.jailed", &jailed, &size, NULL, 0) != -1 || jailed);
     15+}
     16+#else
     17+inline bool inFreeBSDJail()
     18+{
     19+    return false;
     20+}
     21+#endif
     22+
     23 void
     24 inline testFailed(const char* expr, const char* file, unsigned int line)
     25 {
  • files/patch-ice.scripts.TestUtil.py.diff

    diff -urN files/patch-ice.scripts.TestUtil.py.diff.orig files/patch-ice.scripts.TestUtil.py.diff
    old new  
     1--- Ice-3.4.2.orig/scripts/TestUtil.py  2011-06-15 21:44:00.000000000 +0200
     2+++ Ice-3.4.2/scripts/TestUtil.py       2012-03-04 20:14:53.000000000 +0100
     3@@ -74,6 +74,25 @@
     4 def isLinux():
     5     return sys.platform.startswith("linux")
     6 
     7+def isFreeBSD():
     8+    return sys.platform.startswith("freebsd")
     9+
     10+def sysctl(key):
     11+    p = subprocess.Popen("sysctl "+key, shell=1, stdout=subprocess.PIPE)
     12+    try:
     13+        result = p.communicate()[0].strip().split()[1]
     14+    except IndexError:
     15+        return 0   
     16+    if sys.version_info >= (3,):
     17+        result = str(result, sys.stdout.encoding)
     18+    try:
     19+        return int(result)
     20+    except ValueError:
     21+        return result
     22+
     23+def isFreeBSDJail():
     24+    return isFreeBSD() and sysctl("security.jail.jailed")
     25+
     26 def getCppCompiler():
     27     compiler = ""
     28     if os.environ.get("CPP_COMPILER", "") != "":
     29@@ -1590,7 +1609,15 @@
     30             if isDarwin() and "nodarwin" in config:
     31                 print "%s*** test not supported under Darwin%s" % (prefix, suffix)
     32                 continue
     33+
     34+            if isFreeBSD() and "nofreebsd" in config:
     35+                print "%s*** test not supported under FreeBSD%s" % (prefix, suffix)
     36+                continue
     37             
     38+            if isFreeBSDJail() and "nofreebsdjail" in config:
     39+                print "%s*** test not supported within a FreeBSD Jail%s" % (prefix, suffix)
     40+                continue
     41+
     42             if not isWin32() and "win32only" in config:
     43                 print "%s*** test only supported under Win32%s" % (prefix, suffix)
     44                 continue