[asterisk-scf-commits] asterisk-scf/integration/ice.git branch "add-toplevel-test-target" created.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Fri Feb 18 12:37:23 CST 2011
branch "add-toplevel-test-target" has been created
at 6c628e0a4520a58c780ea3c6a421c8cf2df8b974 (commit)
- Log -----------------------------------------------------------------
commit 6c628e0a4520a58c780ea3c6a421c8cf2df8b974
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Fri Jun 18 11:20:23 2010 -0500
import patch
diff --git a/Makefile.mak b/Makefile.mak
index 79988f9..0633b02 100644
--- a/Makefile.mak
+++ b/Makefile.mak
@@ -47,6 +47,11 @@ install::
@echo "making install in %i" && \
cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) install" || exit 1
+test::
+ @for %i in ( $(SUBDIRS) ) do \
+ @echo "making test in %i" && \
+ cmd /c "cd %i && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) test" || exit 1
+
cpp::
@echo "making all in cpp" && \
cmd /c "cd cpp && $(MAKE) -nologo -f Makefile.mak $(MAKEFLAGS) all" || exit 1
commit 4a8aab6bfd6868dc676a7b97aad2c2c460e61983
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Fri Jun 18 07:46:40 2010 -0500
Imported Upstream version 3.4.1
diff --git a/CHANGES b/CHANGES
index a9de5cb..06ac400 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,5 @@
======================================================================
-CHANGES for Ice 3.4
+CHANGES for Ice 3.4.1
======================================================================
The entries below contain brief descriptions of the changes in a
@@ -20,6 +20,107 @@ subdirectory of each language mapping (e.g., cpp/CHANGES).
======================================================================
+Changes since version 3.4.0
+======================================================================
+
+
+General Changes
+===============
+
+- Added the new property Freeze.DbEnv.<db>.LockFile and changed the
+ dumpdb and transformdb utilities so that they can be run safely on
+ a database environment that is currently open in another process.
+
+- Changed the Glacier2 helper classes to cache the client category.
+
+- Added the ability to use underscores in Slice identifiers. See the
+ release notes for important information on this change.
+
+- Added the setConnectContext method to Glacier2.SessionFactoryHelper,
+ which allows an application to provide a request context to be used
+ when creating a Glacier2 session. (Java and C#)
+
+- Fixed IceGrid bug where node observers would not be notified when a
+ server is re-enabled after it has been updated and if the server was
+ disabled following an activation failure.
+
+- Fixed a bug in the Glacier2.SessionFactoryHelper class (Java/C#) in
+ which the getPort() method would return an incorrect default port if
+ no port was configured.
+
+
+C++ Changes
+===========
+
+- Fixed a bug in slice2cpp in which streaming code was not generated
+ properly for types in nested modules.
+
+- slice2cpp now generates a "one-shot" constructor for a Slice
+ structure if at least one of its members has a default value.
+
+- Fixed a bug in slice2cpp so that asynchronous "end_op" methods are
+ now exported properly.
+
+- Fixed a bug in slice2cpp that would generate invalid code for a
+ Slice exception when the --stream option was not used.
+
+- Fixed compatibility issues with OpenSSL 1.0.
+
+- Fixed a bug in slice2cpp that would cause invalid code to be
+ generated for a nested Slice definition when the --stream option was
+ used.
+
+- Fixed a bug in Freeze that disabled automatic log deletion.
+
+
+Java Changes
+============
+
+- Fixed an issue in which intensive use of Freeze or the stream API
+ could cause an OutOfMemoryError. Note that Freeze maps must be
+ regenerated with slice2freezej to incorporate this fix.
+
+- Fixed a bug in the Slice2Java ant task in which duplicate Slice
+ files could be passed to slice2java. Also fixed a bug in slice2java
+ that caused the translator to fail if a duplicate file was passed
+ on the command line.
+
+- Fixed race condition which could cause the thread pool selector
+ thread to go away (causing the thread pool to not dispatch further
+ incoming messages).
+
+- Deprecated Ice.AsyncCallback. To use the generic asynchronous
+ callback facility, applications should derive their classes from
+ Ice.Callback.
+
+- The size method on a Freeze.Map and on the value of an indexed
+ submap now use the current transaction associated with the
+ connection, if any.
+
+
+C# Changes
+==========
+
+- Fixed a bug in the generated code that prevented sequences from
+ being marshaled using the stream API if the sequences used generic
+ collection types.
+
+- Fixed a bug in the IceSSL plug-in that could incorrectly report a
+ certificate verification failure when the IceSSL.CheckCertName
+ property is enabled.
+
+
+Python Changes
+==============
+
+- Fixed a bug in which destroyed Communicator instances were not being
+ garbage collected.
+
+- Fixed a bug in Ice.Application in which the exit status was not
+ properly returned from main().
+
+
+======================================================================
Changes since version 3.4b
======================================================================
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 993b0ee..aaeca42 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -1,5 +1,5 @@
======================================================================
-Release notes for Ice 3.4
+Release notes for Ice 3.4.1
======================================================================
Introduction
@@ -18,43 +18,39 @@ Table of Contents
-----------------
1. New Features
- - New API for Asynchronous Method Invocation (AMI)
- - Better scalability
- - New Dispatcher facility
- - Glacier2 utility classes
- - Default servants
- - Alternate storage for IceGrid and IceStorm
- - Connection and endpoint information
- - New Slice compiler and API for PHP
- - Slice comments
- - New Slice syntax for default values
- - Properties in the Windows registry
- - New sample programs
- 2. Upgrading your application from Ice 3.3
+ - Changes and fixes in Ice 3.4.1
+ - Features added with Ice 3.4.0
+ 2. Upgrading your application from Ice 3.4.0
+ - RPMS
+ - Windows
+ - Binary Archives
+ - Source Distribution
+ - Deprecated APIs
+ 3. Upgrading your application from Ice 3.3
- Compatibility
- Java language mapping changes
- Changes to the Java API for Freeze maps
- Freeze packaging
- PHP changes
- IceSSL changes
+ - Thread pool changes
- Migrating IceStorm and IceGrid databases
- Migrating Freeze databases
- Removed APIs
- Deprecated APIs
- 3. Upgrading your application from Ice 3.2 or earlier releases
+ 4. Upgrading your application from Ice 3.2 or earlier releases
- Migrating IceStorm databases
- Migrating IceGrid databases
- Migrating Freeze databases
- Removed APIs
- Deprecated APIs
- 4. Platform-specific notes
+ 5. Platform-specific notes
- Supported platforms
- Java and IPv6
- Mono
- IBM JDK
- 5. Known Problems
+ 6. Known Problems
- iceca failure on SLES11
- - Minor memory leak in Berkeley DB
======================================================================
@@ -64,6 +60,130 @@ Table of Contents
This section discusses the significant enhancements in Ice 3.4.
+Changes and fixes in Ice 3.4.1
+==============================
+
+
+Underscores allowed in Slice
+----------------------------
+
+Prior versions of Ice did not permit underscores to be used in Slice
+identifiers. We have eliminated that restriction in Ice 3.4.1 with a
+new translator option (--underscore).
+
+Please note that there are several important issues to consider if you
+plan to incorporate underscores into your Slice definitions:
+
+* Interoperability
+
+ Renaming an existing Slice definition always raises the possibility
+ of interoperability problems with existing applications. Changing
+ the name of any Slice definition whose type id is sent "over the
+ wire" can easily break interoperability unless all applications are
+ rebuilt and redeployed. Adding underscores to your Slice definitions
+ presents an additional difficulty because the Slice compilers for
+ older versions of Ice will not even be able to compile your new
+ definitions.
+
+* Name collisions
+
+ With some effort, it is possible to write legal Slice definitions
+ using underscores that generate name collisions in a language
+ mapping. For example:
+
+ // Slice
+ module A
+ {
+ interface B_C { };
+ };
+
+ module A_B
+ {
+ interface C { };
+ };
+
+ The Slice compiler for PHP (slice2php) uses underscores to separate
+ name scopes in the flattened mapping, therefore both of these
+ interfaces generate the same PHP type named A_B_C.
+
+ Here is another example:
+
+ // Slice
+ module A
+ {
+ interface B
+ {
+ void op();
+ void begin_op();
+ };
+
+ struct Callback_B_op
+ {
+ string s;
+ };
+ };
+
+ These Slice definitions cause collisions with generated code that
+ supports asynchronous invocations.
+
+ Although these are contrived examples written intentionally to cause
+ errors, they highlight the importance of selecting your Slice
+ identifiers with careful consideration of your target language
+ mappings.
+
+* Freeze
+
+ As discussed in the Interoperability section above, renaming Slice
+ types poses a range of compatibility issues. If you use Freeze to
+ store instances of Slice types persistently, be aware that renaming
+ Slice types usually requires that you also migrate your Freeze
+ databases because Slice type names are embedded in your records (if
+ you store instances of Slice classes) and also appear in the Freeze
+ catalog.
+
+
+Freeze locking
+--------------
+
+Ice 3.4.0 added a locking mechanism to Freeze to prevent multiple
+processes from opening the same database environment simultaneously,
+which can lead to data corruption. Freeze uses a lock file named
+__Freeze/lock, which can be found in the database environment
+directory.
+
+In Ice 3.4.1 we added the property Freeze.DbEnv.<env>.LockFile. This
+property determines whether Freeze attempts to create the lock file
+for the named database environment. The default value of this property
+is 1, meaning the lock file is created. Applications should not
+normally need to disable the lock file, but it is useful for utility
+programs such as the FreezeScript tools dumpdb and transformdb. By
+disabling the lock file, these tools are able to inspect a database
+environment that is currently open in another process, regardless of
+whether that process created a lock file.
+
+If you intend to use a FreezeScript tool on a database environment
+that is currently open, please be aware that the property
+Freeze.DbEnv.<env>.DbPrivate=0 must be defined for both the
+FreezeScript tool as well as the other process that has opened the
+environment, otherwise the database can be corrupted.
+
+
+Miscellaneous changes
+---------------------
+
+* Ice 3.4.1 requires Berkeley DB 4.8.30. This version of Berkeley DB
+ includes a fix for a minor memory leak that was present in earlier
+ versions.
+
+* The shrinking behavior of Ice thread pools changed in Ice 3.4.0 but
+ was not documented. Users of both 3.4.0 and 3.4.1 should review the
+ "Thread pool changes" section below for more information.
+
+
+Features added with Ice 3.4.0
+=============================
+
+
New API for Asynchronous Method Invocation (AMI)
------------------------------------------------
@@ -279,7 +399,197 @@ This release adds the following sample programs:
======================================================================
-2. Upgrading your application from Ice 3.3
+2. Upgrading your application from Ice 3.4.0
+======================================================================
+
+Since Ice 3.4.1 maintains binary compatibility with Ice 3.4.0, it is
+not necessary for you to recompile your Slice files or your program
+code, nor is it necessary to relink your application. The database
+formats used by Ice services such as IceGrid and IceStorm have not
+changed, therefore no database migration is required. Finally, this
+release has not removed any APIs. Generally speaking, you are free to
+use any combination of Ice 3.4.0 or Ice 3.4.1 applications and Ice
+services.
+
+The subsections below provide additional information about upgrading
+to Ice 3.4.1, including administrative procedures for the supported
+platforms.
+
+
+RPMs (Linux)
+============
+
+For RPM installations, you can use the Ice 3.4.1 RPMs to upgrade an
+existing installation of Ice 3.4.0.
+
+For a Java application, no additional steps are necessary if your
+CLASSPATH refers to /usr/share/java/Ice.jar, which is a symbolic link
+that points to the actual version-specific JAR file.
+
+For a Mono application, the ice-mono RPM for Ice 3.4.1 installs the
+updated Ice run time assemblies into the Global Assembly Cache (GAC)
+along with policy assemblies that enable backward compatibility with
+Ice 3.4.0.
+
+
+Windows
+=======
+
+The file names of the Ice for C++ run time DLLs do not contain the
+patch number of a release. For example, the core Ice DLL uses the same
+name (ice34.dll) for both Ice 3.4.0 and Ice 3.4.1. As a result, you
+can simply substitute the 3.4.1 DLLs for the 3.4.0 DLLs. If you
+install the 3.3.1 DLLs in a different directory, you will typically
+need to adjust the PATH setting of a C++ application so that it can
+locate the new libraries. This also applies to Python, Ruby, and PHP
+applications because they use the Ice for C++ DLLs.
+
+For a Java application, you can replace the existing Ice.jar file
+with the one from Ice 3.4.1, or you can adjust the CLASSPATH setting
+to point to the new JAR file.
+
+For a .NET application, Ice for .NET includes policy assemblies that
+supply the .NET run time with the required compatibility information.
+Policy assemblies have names of the form policy.3.4.<package>.dll.
+For example, the policy assembly for IceBox is policy.3.4.IceBox.dll.
+One way to upgrade an existing .NET application to a new patch release
+while maintaining binary compatibility is to install the policy
+assemblies into the Global Assembly Cache (GAC) using one of the
+following methods:
+
+ - Open Windows Explorer and navigate to the directory
+ C:\WINDOWS\assembly. Next, drag and drop (or copy and paste) the
+ assemblies into the right-hand pane to install them in the GAC.
+
+ - Use gacutil from the command line:
+
+ > gacutil -i <policy.dll>
+
+Another option is to modify the .config file of your application to
+add bindingRedirect directives, as explained in the links below:
+
+ http://msdn.microsoft.com/en-us/library/7wd6ex19.aspx
+ http://msdn.microsoft.com/en-us/library/yx7xezcf.aspx
+
+For example, in the .config file of an application you can modify the
+configuration of the Ice assembly as follows:
+
+ <dependentAssembly>
+ <assemblyIdentity name="Ice" culture="neutral"
+ publicKeyToken="cdd571ade22f2f16"/>
+ <bindingRedirect oldVersion="3.4.0.0" newVersion="3.4.1.0"/>
+ <codeBase version="3.4.1.0" href="...\Ice.dll"/>
+ </dependentAssembly>
+
+Note that "cdd571ade22f2f16" is the token corresponding to ZeroC's
+public key for signing the assemblies in binary distributions. If you
+built Ice from sources, your assemblies were signed using the
+development key instead, which you can find in config/IceDevKey.snk.
+The token for the development key is "1f998c50fec78381".
+
+The advantage of installing the policy assemblies into the GAC is that
+they establish binary compatibility for all Ice applications, whereas
+modifying a .config file must be done for each application
+individually.
+
+On a development system, it is not necessary to remove your existing
+Ice installation prior to installing Ice 3.4.1 unless you intend to
+install Ice 3.4.1 in the same directory as your existing installation.
+You may need to update your PATH setting and modify your Visual C++
+directory configurations to reflect the installation directory for
+Ice 3.4.1.
+
+
+Binary Archives (Mac OS X, Solaris)
+===================================
+
+The README file included in each binary distribution archive
+describes how to configure your environment so that the embedded
+path names in the Ice for C++ shared libraries are resolved correctly.
+For example, if you extracted the binary distribution for Ice 3.4.0
+into /opt/Ice-3.4.0, the README file instructs you to create the
+following symbolic link:
+
+ /opt/Ice-3.4 -> /opt/Ice-3.4.0
+
+To upgrade to Ice 3.4.1, you simply extract the binary distribution
+archive into /opt/Ice-3.4.1 and reset the symbolic link to point to
+the new installation:
+
+ /opt/Ice-3.4 -> /opt/Ice-3.4.1
+
+No additional steps are necessary for a Java application if its
+CLASSPATH refers to the JAR file via the symbolic link:
+
+ export CLASSPATH=/opt/Ice-3.4/lib/Ice.jar
+
+This also applies for Python and Ruby applications:
+
+ export PYTHONPATH=/opt/Ice-3.4/python
+ export RUBYLIB=/opt/Ice-3.4/ruby
+
+
+Source Distribution (Linux, Mac OS X, Solaris)
+==============================================
+
+If you compiled an Ice 3.4.0 source distribution and installed it via
+"make install", the default installation directory uses a version-
+specific name such as /opt/Ice-3.4.0. Consequently, you can build and
+install the Ice 3.4.1 source distribution without affecting your
+existing Ice 3.4.0 installation.
+
+You may need to update your application's build settings to use the
+new installation directory for location include and library files.
+You may also need to update your shared library search path.
+
+The relevant environment variables for each language mapping are
+detailed below.
+
+C++, Ruby, Python, PHP:
+
+ export LD_LIBRARY_PATH=/opt/Ice-3.4.1/lib (32-bit Linux & 32-bit Solaris)
+ export LD_LIBRARY_PATH=/opt/Ice-3.4.1/lib64 (64-bit Linux)
+ export LD_LIBRARY_PATH_64=/opt/Ice-3.4.1/lib/amd64 (64-bit Solaris Intel)
+ export LD_LIBRARY_PATH_64=/opt/Ice-3.4.1/lib/sparcv9 (64-bit Solaris SPARC)
+ export DYLD_LIBRARY_PATH=/opt/Ice-3.4.1/lib (Mac OS X)
+
+Python:
+
+ export PYTHONPATH=/opt/Ice-3.4.1/python
+
+Ruby:
+
+ export RUBYLIB=/opt/Ice-3.4.1/ruby
+
+Java:
+
+ export CLASSPATH=/opt/Ice-3.4.1/lib/Ice.jar
+
+Mono:
+
+ export MONO_PATH=/opt/Ice-3.4.1/bin
+
+
+Deprecated APIs
+===============
+
+This section discusses APIs and components that are now deprecated.
+These APIs will be removed in a future Ice release, therefore we
+encourage you to update your applications and eliminate the use of
+these APIs as soon as possible.
+
+The following APIs were deprecated in Ice 3.4.1:
+
+* Ice.AsyncCallback
+
+ The methods in this class were moved into its base class,
+ Ice.Callback, therefore this class is no longer necessary.
+ Applications that use the generic asynchronous callback facility
+ should change their callbacks to inherit from Ice.Callback.
+
+
+======================================================================
+3. Upgrading your application from Ice 3.3
======================================================================
@@ -292,7 +602,7 @@ factors:
- Source-code compatibility
Ice maintains source-code compatibility between a patch release
- (e.g., 3.3.1) and the most recent minor release (e.g., 3.3.0),
+ (e.g., 3.4.1) and the most recent minor release (e.g., 3.4.0),
but does not guarantee source-code compatibility between minor
releases (e.g., between 3.3 and 3.4).
@@ -1099,6 +1409,20 @@ release:
Refer to the "Configuration" section above for more information.
+Thread pool changes
+===================
+
+A thread pool supports the ability to automatically grow and shrink
+as the demand for threads changes, within the limits set by the
+thread pool's configuration. In prior releases, the rate at which a
+thread pool shrinks was not configurable, but Ice 3.4.0 introduces the
+ThreadIdleTime property to allow you to specify how long a thread pool
+thread must remain idle before it terminates to conserve resources.
+
+Please refer to the "Ice Threading Model" section of the Ice manual
+for more information on this behavior.
+
+
IceSSL changes
==============
@@ -1299,7 +1623,7 @@ The following APIs were deprecated in Ice 3.4:
======================================================================
-3. Upgrading your application from Ice 3.2 or earlier releases
+4. Upgrading your application from Ice 3.2 or earlier releases
======================================================================
In addition to the information provided in the preceding section
@@ -1388,7 +1712,7 @@ for IceGrid 3.4:
$ cd <new-location>
Next, run the upgradeicegrid.py utility located in the `config'
-directory of your Ice distribution (or in /usr/share/Ice-3.4.0 if
+directory of your Ice distribution (or in /usr/share/Ice-3.4.1 if
using an RPM installation). The first argument is the path to the old
database environment. The second argument is the path to the new
database environment.
@@ -1684,7 +2008,7 @@ that were deprecated in Ice 3.4.
======================================================================
-4. Platform-specific notes
+5. Platform-specific notes
======================================================================
@@ -1732,7 +2056,7 @@ directory:
======================================================================
-5. Known Problems
+6. Known Problems
======================================================================
@@ -1755,17 +2079,3 @@ and the version of OpenSSL that is included with SLES11 (OpenSSL
OpenSSL. Note that it is not necessary to rebuild Ice with the new
OpenSSL version; the only requirement is that you have the new
"openssl" executable in your PATH when running "iceca java --import".
-
-
-Minor memory leak in Berkeley DB
---------------------------------
-
-Berkeley DB 4.8.24 leaks a small amount of memory for a database
-environment opened with the DB_PRIVATE flag. With respect to Freeze,
-this means a database environment for which the DbPrivate property is
-set to a non-zero value. Note that the DbPrivate property is enabled
-by default.
-
-We do not anticipate this leak causing any problems for Freeze
-applications, but you can work around it by setting DbPrivate=0 for
-each of your Freeze environments.
diff --git a/config/Make.common.rules b/config/Make.common.rules
index fd8a71b..568a47a 100644
--- a/config/Make.common.rules
+++ b/config/Make.common.rules
@@ -14,8 +14,8 @@
SHELL = /bin/sh
VERSION_MAJOR = 3
VERSION_MINOR = 4
-VERSION_PATCH = 0
-VERSION = 3.4.0
+VERSION_PATCH = 1
+VERSION = 3.4.1
SHORT_VERSION = 3.4
SOVERSION = 34
diff --git a/config/Make.common.rules.mak b/config/Make.common.rules.mak
index 11980a9..5b6d693 100644
--- a/config/Make.common.rules.mak
+++ b/config/Make.common.rules.mak
@@ -12,8 +12,8 @@
# ----------------------------------------------------------------------
SHELL = /bin/sh
-VERSION = 3.4.0
-INTVERSION = 3.4.0
+VERSION = 3.4.1
+INTVERSION = 3.4.1
SHORT_VERSION = 3.4
PATCH_VERSION = 1
SOVERSION = 34
diff --git a/config/PropertyNames.xml b/config/PropertyNames.xml
index e001763..5e931ef 100644
--- a/config/PropertyNames.xml
+++ b/config/PropertyNames.xml
@@ -555,6 +555,7 @@ generated from the section label.
<property name="DbEnv.[any].DbHome" />
<property name="DbEnv.[any].DbPrivate" />
<property name="DbEnv.[any].DbRecoverFatal" />
+ <property name="DbEnv.[any].LockFile" />
<property name="DbEnv.[any].OldLogsAutoDelete" />
<property name="DbEnv.[any].PeriodicCheckpointMinSize" />
<property name="Evictor.[any].BtreeMinKey" />
diff --git a/config/makeprops.py b/config/makeprops.py
index 57c6aff..183113c 100755
--- a/config/makeprops.py
+++ b/config/makeprops.py
@@ -373,8 +373,13 @@ const IceInternal::PropertyArray
""" % { 'className' : self.className, 'section': self.currentSection })
def moveFiles(self, location):
- shutil.move(self.className + ".h", os.path.join(location, "cpp", "src", "Ice"))
- shutil.move(self.className + ".cpp", os.path.join(location, "cpp", "src", "Ice"))
+ dest = os.path.join(location, "cpp", "src", "Ice")
+ if os.path.exists(os.path.join(dest, self.className + ".h")):
+ os.remove(os.path.join(dest, self.className + ".h"))
+ if os.path.exists(os.path.join(dest, self.className + ".cpp")):
+ os.remove(os.path.join(dest, self.className + ".cpp"))
+ shutil.move(self.className + ".h", dest)
+ shutil.move(self.className + ".cpp", dest)
class JavaPropertyHandler(PropertyHandler):
def __init__(self, inputfile, c):
@@ -441,7 +446,10 @@ class JavaPropertyHandler(PropertyHandler):
self.srcFile.write(" };\n\n")
def moveFiles(self, location):
- shutil.move(self.className + ".java", os.path.join(location, "java", "src", "IceInternal"))
+ dest = os.path.join(location, "java", "src", "IceInternal")
+ if os.path.exists(os.path.join(dest, self.className + ".java")):
+ os.remove(os.path.join(dest, self.className + ".java"))
+ shutil.move(self.className + ".java", dest)
class CSPropertyHandler(PropertyHandler):
def __init__(self, inputfile, c):
@@ -503,7 +511,10 @@ class CSPropertyHandler(PropertyHandler):
self.srcFile.write("\n")
def moveFiles(self, location):
- shutil.move(self.className + ".cs", os.path.join(location, "cs", "src", "Ice"))
+ dest = os.path.join(location, "cs", "src", "Ice")
+ if os.path.exists(os.path.join(dest, self.className + ".cs")):
+ os.remove(os.path.join(dest, self.className + ".cs"))
+ shutil.move(self.className + ".cs", dest)
class MultiHandler(PropertyHandler):
def __init__(self, inputfile, c):
diff --git a/cpp/INSTALL.LINUX b/cpp/INSTALL.LINUX
index ed33a7e..f0d3d15 100644
--- a/cpp/INSTALL.LINUX
+++ b/cpp/INSTALL.LINUX
@@ -30,7 +30,7 @@ Third-party libraries
Ice has dependencies on a number of third-party libraries:
-- Berkeley DB 4.8.24
+- Berkeley DB 4.8.30
- expat 1.95.8 or 2.0.1
- OpenSSL 0.9.7 or later (OpenSSL 0.9.8 or later recommended)
- bzip2 1.0.x
@@ -71,11 +71,11 @@ Compilation and Testing
Extract the Ice archive in any directory you like (for example, in
your home directory):
-$ tar xvfz Ice-3.4.0.tar.gz
+$ tar xvfz Ice-3.4.1.tar.gz
-Change the working directory to Ice-3.4.0/cpp:
+Change the working directory to Ice-3.4.1/cpp:
-$ cd Ice-3.4.0/cpp
+$ cd Ice-3.4.1/cpp
Edit config/Make.rules to establish your build configuration. The
comments in the file provide more information. Pay particular
diff --git a/cpp/INSTALL.MACOSX b/cpp/INSTALL.MACOSX
index 477936c..9aef226 100644
--- a/cpp/INSTALL.MACOSX
+++ b/cpp/INSTALL.MACOSX
@@ -22,7 +22,7 @@ Third-party libraries
Ice has dependencies on a number of third-party libraries:
-- Berkeley DB 4.8.24
+- Berkeley DB 4.8.30
- expat 1.95.7 or 2.0.0
- OpenSSL 0.9.7 or later (OpenSSL 0.9.8 or later recommended)
- bzip2 1.0.x
@@ -56,11 +56,11 @@ Compilation and Testing
Extract the Ice archive in any directory you like (for example, in
your home directory):
-$ tar xvfz Ice-3.4.0.tar.gz
+$ tar xvfz Ice-3.4.1.tar.gz
-Change the working directory to Ice-3.4.0/cpp:
+Change the working directory to Ice-3.4.1/cpp:
-$ cd Ice-3.4.0/cpp
+$ cd Ice-3.4.1/cpp
Edit config/Make.rules to establish your build configuration. The
comments in the file provide more information. Pay particular
diff --git a/cpp/INSTALL.SOLARIS b/cpp/INSTALL.SOLARIS
index ac05766..94c0af4 100644
--- a/cpp/INSTALL.SOLARIS
+++ b/cpp/INSTALL.SOLARIS
@@ -31,7 +31,7 @@ Third-party libraries
Ice has dependencies on a number of third-party libraries:
-- Berkeley DB 4.8.24
+- Berkeley DB 4.8.30
- expat 1.95.7 or 2.0.0
- OpenSSL 0.9.7 or later (OpenSSL 0.9.8 or later recommended)
- bzip2 1.0.x
@@ -73,11 +73,11 @@ Compilation and Testing
Extract the Ice archive in any directory you like (for example, in
your home directory):
-$ gtar xvfz Ice-3.4.0.tar.gz
+$ gtar xvfz Ice-3.4.1.tar.gz
-Change the working directory to Ice-3.4.0/cpp:
+Change the working directory to Ice-3.4.1/cpp:
-$ cd Ice-3.4.0/cpp
+$ cd Ice-3.4.1/cpp
Edit config/Make.rules to establish your build configuration. The
comments in the file provide more information. Pay particular
diff --git a/cpp/INSTALL.WINDOWS b/cpp/INSTALL.WINDOWS
index 7dd98d0..fef19c1 100644
--- a/cpp/INSTALL.WINDOWS
+++ b/cpp/INSTALL.WINDOWS
@@ -47,11 +47,17 @@ C++ compiler
The following C++ compilers are supported:
+- Microsoft Visual C++ 2010 (Professional and Express editions)
+
+ Visual C++ 2010 Express is available for download from:
+
+ http://www.microsoft.com/express/downloads/
+
- Microsoft Visual C++ 2008 SP1 (Professional and Express editions)
Visual C++ 2008 Express is available for download from:
- http://www.microsoft.com/express/vc/
+ http://www.microsoft.com/express/downloads/
- Microsoft Visual C++ 6.0 SP5 with the Windows Server 2003 PSDK
(February 2003) and STLport 4.6.2 (or later)
@@ -69,8 +75,9 @@ The following C++ compilers are supported:
The Ice services (IceGrid, IceStorm, etc.) are not supported with
C++Builder builds. C++Builder applications can use the Ice services
but the service executables themselves must come from either a
- Visual C++ 2008 build or from the Windows installer (which includes
- executables built using Visual C++ 2008).
+ Visual C++ 2008/2010 build or from the Windows installer (which
+ includes executables built using Visual C++ 2008 and Visual C++
+ 2010).
C++Builder 2010 Setup
@@ -130,7 +137,7 @@ Third-party libraries
Ice has dependencies on a number of third-party libraries:
- STLport 4.6.2 or later (only for Visual C++ 6.0)
-- Berkeley DB 4.8.24
+- Berkeley DB 4.8.30
- expat 2.0
- OpenSSL 0.9.7 or later (OpenSSL 0.9.8 or later recommended)
- bzip2 1.0
@@ -188,8 +195,8 @@ you like.
Add the "bin" directory of the third-party libraries to your PATH.
Open a command prompt that is configured for your target architecture.
-For example, when using Visual Studio 2008, you have several
-alternatives:
+For example, when using Visual Studio 2008 or Visual Studio 2010, you
+have several alternatives:
- Visual Studio Command Prompt
- Visual Studio x64 Win64 Command Prompt
@@ -207,9 +214,9 @@ Note that you must be using a Windows x64 platform when compiling a
For C++Builder use the "RAD Studio Command Prompt".
-Change the working directory to Ice-3.4.0. For example:
+Change the working directory to Ice-3.4.1. For example:
-> cd C:\Ice-3.4.0\cpp
+> cd C:\Ice-3.4.1\cpp
Edit config\Make.rules.mak to establish your build configuration. The
comments in the file provide more information. In particular, you
@@ -244,10 +251,10 @@ Ice DLLs and executables.
x64 Platform
======================================================================
-Building Ice on x64 with the Visual Studio 2008 C++ compiler is like
-building Ice on x86. You just need need to perform the build in a
-"Visual Studio x64 Win64 Command Prompt", and not in a regular "Visual
-Studio 2008 Command Prompt".
+Building Ice on x64 with the Visual Studio 2008 or Visual Studio 2010
+C++ compiler is like building Ice on x86. You just need need to
+perform the build in a "Visual Studio x64 Win64 Command Prompt", and
+not in a regular "Visual Studio 2008/2010 Command Prompt".
You can also use the "Visual Studio x64 Cross Tools Command Prompt" if
you set the following environment variable:
diff --git a/cpp/allTests.py b/cpp/allTests.py
index efe0a5b..ef90e88 100755
--- a/cpp/allTests.py
+++ b/cpp/allTests.py
@@ -34,6 +34,7 @@ tests = [
("IceUtil/fileLock", ["once"]),
("Slice/errorDetection", ["once"]),
("Slice/keyword", ["once"]),
+ ("Slice/structure", ["once"]),
("Ice/proxy", ["core"]),
("Ice/operations", ["core"]),
("Ice/exceptions", ["core"]),
diff --git a/cpp/config/Make.rules.mak b/cpp/config/Make.rules.mak
old mode 100644
new mode 100755
index 16f4784..a8e4a0a
--- a/cpp/config/Make.rules.mak
+++ b/cpp/config/Make.rules.mak
@@ -28,7 +28,7 @@ prefix = C:\Ice-$(VERSION)
#
# Specify your C++ compiler. Supported values are:
-# VC60, VC90, VC90_EXPRESS, BCC2010
+# VC60, VC90, VC90_EXPRESS, VC100, VC100_EXPRESS, BCC2010
#
!if "$(CPP_COMPILER)" == ""
CPP_COMPILER = VC90
@@ -95,7 +95,9 @@ SETARGV = setargv.obj
!if "$(CPP_COMPILER)" == "BCC2010"
BCPLUSPLUS = yes
!include $(top_srcdir)/config/Make.rules.bcc
-!elseif "$(CPP_COMPILER)" == "VC60" || "$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS"
+!elseif "$(CPP_COMPILER)" == "VC60" || \
+ "$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS" || \
+ "$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS"
!include $(top_srcdir)/config/Make.rules.msvc
! else
!error Invalid setting for CPP_COMPILER: $(CPP_COMPILER)
@@ -106,6 +108,8 @@ libsuff = \bcc10
!elseif "$(CPP_COMPILER)" == "VC60"
libsuff = \vc6
UNIQUE_DLL_NAMES = yes
+!elseif "$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS"
+libsuff = \vc100$(x64suffix)
!else
libsuff = $(x64suffix)
!endif
@@ -129,6 +133,8 @@ CPPFLAGS = -I"$(ice_dir)\include\stlport" $(CPPFLAGS)
COMPSUFFIX = vc60_
!elseif "$(CPP_COMPILER)" == "VC90" || "$(CPP_COMPILER)" == "VC90_EXPRESS"
COMPSUFFIX = vc90_
+!elseif "$(CPP_COMPILER)" == "VC100" || "$(CPP_COMPILER)" == "VC100_EXPRESS"
+COMPSUFFIX = vc100_
!elseif "$(CPP_COMPILER)" == "BCC2010"
COMPSUFFIX = bcc10_
!endif
diff --git a/cpp/config/Make.rules.msvc b/cpp/config/Make.rules.msvc
old mode 100644
new mode 100755
index bd661ce..07bea63
--- a/cpp/config/Make.rules.msvc
+++ b/cpp/config/Make.rules.msvc
@@ -56,7 +56,10 @@ LDFLAGS = $(LDFLAGS) /nologo /FIXED:no
!if "$(OPTIMIZE)" != "yes"
-LDFLAGS = $(LDFLAGS) /debug /incremental:yes
+LDFLAGS = $(LDFLAGS) /debug
+!if "$(CPP_COMPILER)" != "VC100" && "$(CPP_COMPILER)" != "VC100_EXPRESS"
+LDFLAGS = $(LDFLAGS) /incremental:yes
+!endif
!else
diff --git a/cpp/demo/Freeze/backup/README b/cpp/demo/Freeze/backup/README
index d9a5f95..a6004ed 100644
--- a/cpp/demo/Freeze/backup/README
+++ b/cpp/demo/Freeze/backup/README
@@ -19,7 +19,7 @@ db utility names
----------------
The Berkeley DB utilities are usually named db_hotbackup, db_archive,
-db_recover, etc. If you use the Berkeley DB 4.8.24 RPMs provided by
+db_recover, etc. If you use the Berkeley DB 4.8.30 RPMs provided by
ZeroC, the utility names are db48_hotbackup, db48_archive, etc. Please
adjust the instructions below accordingly.
diff --git a/cpp/demo/Freeze/casino/BankI.cpp b/cpp/demo/Freeze/casino/BankI.cpp
index 9aba51d..a3c6325 100644
--- a/cpp/demo/Freeze/casino/BankI.cpp
+++ b/cpp/demo/Freeze/casino/BankI.cpp
@@ -18,7 +18,7 @@ BankI::buyChips(int chips, const Casino::PlayerPrx& p, const Ice::Current&)
{
outstandingChips += chips;
chipsSold += chips;
-
+
CasinoStore::PersistentPlayerPrx player = CasinoStore::PersistentPlayerPrx::uncheckedCast(p);
try
@@ -40,7 +40,7 @@ BankI::getPlayers(const Ice::Current& current) const
Casino::PlayerPrxSeq result;
Freeze::EvictorIteratorPtr p = _playerEvictor->getIterator("", 10);
-
+
while(p->hasNext())
{
Ice::Identity ident = p->next();
@@ -55,7 +55,7 @@ BankI::getOutstandingChips(const Ice::Current&) const
{
return outstandingChips;
}
-
+
int
BankI::getEarnings(const Ice::Current&) const
{
@@ -71,7 +71,7 @@ BankI::getLiveBetCount(const Ice::Current&) const
bool
BankI::checkAllChips(const Ice::Current& current) const
-{
+{
int playerTotal = 0;
Casino::PlayerPrxSeq players = getPlayers(current);
@@ -114,7 +114,7 @@ BankI::createBet(int amount, int lifetime, const Ice::Current&)
outstandingChips += amount;
Ice::ObjectPtr betI = new BetI(amount, closeTime, _prx, _betEvictor, _bankEdge);
- CasinoStore::PersistentBetPrx newBet =
+ CasinoStore::PersistentBetPrx newBet =
CasinoStore::PersistentBetPrx::uncheckedCast(_betEvictor->add(betI, ident));
_betResolver->add(newBet, closeTime);
@@ -144,7 +144,7 @@ BankI::returnAllChips(const CasinoStore::PersistentPlayerPrx& p, const Ice::Curr
assert(0);
throw Freeze::DatabaseException(__FILE__, __LINE__, "returnAllChips: player does not exist");
}
-
+
if(count != 0)
{
try
@@ -168,7 +168,7 @@ void
BankI::reloadBets(const Ice::Current& current)
{
vector<CasinoStore::PersistentBetPrx> bets = getBets(current.adapter);
-
+
for(size_t i = 0; i < bets.size(); ++i)
{
_betResolver->add(bets[i], bets[i]->getCloseTime());
@@ -179,8 +179,8 @@ BankI::BankI()
{
}
-BankI::BankI(const CasinoStore::PersistentBankPrx& prx,
- const Freeze::TransactionalEvictorPtr& evictor, const Freeze::TransactionalEvictorPtr& playerEvictor,
+BankI::BankI(const CasinoStore::PersistentBankPrx& prx,
+ const Freeze::TransactionalEvictorPtr& evictor, const Freeze::TransactionalEvictorPtr& playerEvictor,
const Freeze::TransactionalEvictorPtr& betEvictor, BetResolver& betResolver, int bankEdge)
{
chipsSold = 0;
@@ -188,10 +188,9 @@ BankI::BankI(const CasinoStore::PersistentBankPrx& prx,
init(prx, evictor, playerEvictor, betEvictor, betResolver, bankEdge);
}
-
-void
+void
BankI::init(const CasinoStore::PersistentBankPrx& prx,
- const Freeze::TransactionalEvictorPtr& evictor, const Freeze::TransactionalEvictorPtr& playerEvictor,
+ const Freeze::TransactionalEvictorPtr& evictor, const Freeze::TransactionalEvictorPtr& playerEvictor,
const Freeze::TransactionalEvictorPtr& betEvictor, BetResolver& betResolver, int bankEdge)
{
_prx = prx;
@@ -202,13 +201,13 @@ BankI::init(const CasinoStore::PersistentBankPrx& prx,
_bankEdge = bankEdge;
}
-vector<CasinoStore::PersistentBetPrx>
+vector<CasinoStore::PersistentBetPrx>
BankI::getBets(const Ice::ObjectAdapterPtr& adapter) const
{
vector<CasinoStore::PersistentBetPrx> result;
Freeze::EvictorIteratorPtr p = _betEvictor->getIterator("", 100);
-
+
while(p->hasNext())
{
Ice::Identity ident = p->next();
diff --git a/cpp/demo/Freeze/casino/BankI.h b/cpp/demo/Freeze/casino/BankI.h
index 7d2a118..6fee4e1 100644
--- a/cpp/demo/Freeze/casino/BankI.h
+++ b/cpp/demo/Freeze/casino/BankI.h
@@ -20,40 +20,39 @@ class BankI : public CasinoStore::PersistentBank
public:
virtual bool buyChips(int, const Casino::PlayerPrx&, const Ice::Current&);
-
+
virtual Casino::PlayerPrxSeq getPlayers(const Ice::Current&) const;
-
+
virtual int getOutstandingChips(const Ice::Current&) const;
-
+
virtual int getEarnings(const Ice::Current&) const;
-
+
virtual int getLiveBetCount(const Ice::Current&) const;
-
+
virtual bool checkAllChips(const Ice::Current&) const;
-
+
virtual Casino::BetPrx createBet(int, int, const Ice::Current&);
-
+
virtual void win(int, const Ice::Current&);
-
+
virtual void returnAllChips(const CasinoStore::PersistentPlayerPrx&, const Ice::Current&);
-
+
virtual void reloadBets(const Ice::Current&);
-
+
BankI();
-
- BankI(const CasinoStore::PersistentBankPrx&,
- const Freeze::TransactionalEvictorPtr&, const Freeze::TransactionalEvictorPtr&,
+
+ BankI(const CasinoStore::PersistentBankPrx&,
+ const Freeze::TransactionalEvictorPtr&, const Freeze::TransactionalEvictorPtr&,
const Freeze::TransactionalEvictorPtr&, BetResolver&, int);
- void
+ void
init(const CasinoStore::PersistentBankPrx&,
- const Freeze::TransactionalEvictorPtr&, const Freeze::TransactionalEvictorPtr&,
- const Freeze::TransactionalEvictorPtr&, BetResolver& betResolver, int);
+ const Freeze::TransactionalEvictorPtr&, const Freeze::TransactionalEvictorPtr&,
+ const Freeze::TransactionalEvictorPtr&, BetResolver&, int);
private:
-
+
std::vector<CasinoStore::PersistentBetPrx> getBets(const Ice::ObjectAdapterPtr&) const;
-
#if (defined(_MSC_VER) && (_MSC_VER < 1300)) || defined(__BCPLUSPLUS__)
//
diff --git a/cpp/demo/Freeze/casino/BetI.cpp b/cpp/demo/Freeze/casino/BetI.cpp
index c652136..f0dda40 100644
--- a/cpp/demo/Freeze/casino/BetI.cpp
+++ b/cpp/demo/Freeze/casino/BetI.cpp
@@ -9,22 +9,22 @@
#include <BetI.h>
-
-int
+int
BetI::getAmount(const Ice::Current&) const
{
return amount;
}
-void
+void
BetI::accept(const Casino::PlayerPrx& p, const Ice::Current&)
{
- CasinoStore::PersistentPlayerPrx player = CasinoStore::PersistentPlayerPrx::uncheckedCast(p);
- if(player == 0)
+ if(!p)
{
throw Casino::OutOfChipsException();
}
-
+
+ CasinoStore::PersistentPlayerPrx player = CasinoStore::PersistentPlayerPrx::uncheckedCast(p);
+
try
{
player->withdraw(amount);
@@ -36,7 +36,7 @@ BetI::accept(const Casino::PlayerPrx& p, const Ice::Current&)
}
}
-int
+int
BetI::getChipsInPlay(const Ice::Current&) const
{
return amount * static_cast<int>(potentialWinners.size());
@@ -62,14 +62,14 @@ BetI::complete(int random, const Ice::Current& current)
// Pick a winner using random
//
int winnerIndex = random % (size + (_bankEdge - 1));
-
+
if(winnerIndex >= size)
{
winnerIndex = 0;
}
-
+
CasinoStore::WinnerPrx winner = potentialWinners[winnerIndex];
-
+
try
{
winner->win(amount * size);
@@ -82,7 +82,7 @@ BetI::complete(int random, const Ice::Current& current)
winner = potentialWinners[0];
winner->win(amount * size);
}
-
+
//
// Self-destroys
//
@@ -93,7 +93,7 @@ BetI::BetI()
{
}
-BetI::BetI(int amount, Ice::Long closeTime, const CasinoStore::PersistentBankPrx& bank,
+BetI::BetI(int amount, Ice::Long closeTime, const CasinoStore::PersistentBankPrx& bank,
const Freeze::TransactionalEvictorPtr& evictor, int bankEdge)
{
this->amount = amount;
@@ -108,5 +108,3 @@ BetI::init(const Freeze::TransactionalEvictorPtr& evictor, int bankEdge)
_evictor = evictor;
_bankEdge = bankEdge;
}
-
-
diff --git a/cpp/demo/Freeze/casino/BetI.h b/cpp/demo/Freeze/casino/BetI.h
index 7beedf2..75f2c48 100644
--- a/cpp/demo/Freeze/casino/BetI.h
+++ b/cpp/demo/Freeze/casino/BetI.h
@@ -19,25 +19,25 @@ class BetI : public CasinoStore::PersistentBet
public:
virtual int getAmount(const Ice::Current&) const;
-
+
virtual void accept(const Casino::PlayerPrx&, const Ice::Current&);
-
+
virtual int getChipsInPlay(const Ice::Current&) const;
-
+
virtual Ice::Long getCloseTime(const Ice::Current&) const;
-
+
virtual void complete(int, const Ice::Current&);
BetI();
-
+
BetI(int, Ice::Long, const CasinoStore::PersistentBankPrx&,
const Freeze::TransactionalEvictorPtr& evictor, int);
-
+
void init(const Freeze::TransactionalEvictorPtr&, int);
private:
- Freeze::TransactionalEvictorPtr _evictor;
+ Freeze::TransactionalEvictorPtr _evictor;
int _bankEdge;
};
diff --git a/cpp/demo/Freeze/casino/BetResolver.cpp b/cpp/demo/Freeze/casino/BetResolver.cpp
index 9271770..f518f7a 100644
--- a/cpp/demo/Freeze/casino/BetResolver.cpp
+++ b/cpp/demo/Freeze/casino/BetResolver.cpp
@@ -27,7 +27,6 @@ BetResolver::start()
}
}
-
void
BetResolver::add(const CasinoStore::PersistentBetPrx& bet, Ice::Long closeTime)
{
@@ -41,7 +40,7 @@ BetResolver::add(const CasinoStore::PersistentBetPrx& bet, Ice::Long closeTime)
{
}
- virtual void
+ virtual void
runTimerTask()
{
try
@@ -65,7 +64,7 @@ BetResolver::add(const CasinoStore::PersistentBetPrx& bet, Ice::Long closeTime)
private:
BetResolver& _resolver;
CasinoStore::PersistentBetPrx _bet;
-
+
};
IceUtil::Time timeLeft = IceUtil::Time::milliSeconds(closeTime) - IceUtil::Time::now();
diff --git a/cpp/demo/Freeze/casino/BetResolver.h b/cpp/demo/Freeze/casino/BetResolver.h
index fa6bb39..bc27b81 100644
--- a/cpp/demo/Freeze/casino/BetResolver.h
+++ b/cpp/demo/Freeze/casino/BetResolver.h
@@ -23,11 +23,11 @@ public:
BetResolver();
void start();
-
+
void add(const CasinoStore::PersistentBetPrx&, Ice::Long);
-
+
void destroy();
-
+
int getBetCount() const;
#if (!defined(_MSC_VER) || (_MSC_VER >= 1300)) && (!defined(__BCPLUSPLUS__))
@@ -47,4 +47,3 @@ private:
};
#endif
-
diff --git a/cpp/demo/Freeze/casino/Client.cpp b/cpp/demo/Freeze/casino/Client.cpp
index 60f0921..d94c223 100644
--- a/cpp/demo/Freeze/casino/Client.cpp
+++ b/cpp/demo/Freeze/casino/Client.cpp
@@ -55,19 +55,19 @@ CasinoClient::run(int argc, char* argv[])
cout << "Retrieve bank and players... " << flush;
Casino::BankPrx bank = Casino::BankPrx::uncheckedCast(communicator()->propertyToProxy("Bank.Proxy"));
-
+
Casino::PlayerPrxSeq players = bank->getPlayers();
cout << "ok" << endl;
cout << "Starting balances" << endl;
printBalances(players);
-
+
cout << "Current bank earnings: " << bank->getEarnings() << " chips" << endl;
cout << "All chips accounted for? " << (bank->checkAllChips() ? "yes" : "no") << endl;
-
+
cout << "Each player buys 3,000 chips... " << flush;
-
+
for(size_t i = 0; i < players.size(); ++i)
{
Casino::PlayerPrx player = players[i];
@@ -75,7 +75,7 @@ CasinoClient::run(int argc, char* argv[])
{
if(!bank->buyChips(3000, player))
{
- cout << "(" << player->ice_getIdentity().name << "is gone) " << flush;
+ cout << "(" << player->ice_getIdentity().name << " is gone) " << flush;
players[i] = 0;
}
}
@@ -83,7 +83,7 @@ CasinoClient::run(int argc, char* argv[])
cout << "ok" << endl;
cout << "All chips accounted for? " << (bank->checkAllChips() ? "yes" : "no") << endl;
-
+
cout << "Create " << betCount1 << " 10-chips bets... " << flush;
int b;
@@ -108,7 +108,7 @@ CasinoClient::run(int argc, char* argv[])
catch(const Casino::OutOfChipsException&)
{
cout << "(" << player->ice_getIdentity().name << " is out) " << flush;
-
+
players[i] = 0;
}
}
@@ -117,7 +117,7 @@ CasinoClient::run(int argc, char* argv[])
cout << " ok" << endl;
cout << "Live bets: " << bank->getLiveBetCount() << endl;
-
+
int index = static_cast<int>(rand() % players.size());
Casino::PlayerPrx gonner = players[index];
players[index] = 0;
@@ -139,13 +139,12 @@ CasinoClient::run(int argc, char* argv[])
}
cout << "All chips accounted for? " << (bank->checkAllChips() ? "yes" : "no") << endl;
-
+
cout << "Sleep for 2 seconds" << endl;
IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(2));
cout << "Live bets: " << bank->getLiveBetCount() << endl;
-
cout << "Create " << betCount2 << " 10-chips bets... " << flush;
for(b = 0; b < betCount2; ++b)
@@ -169,22 +168,22 @@ CasinoClient::run(int argc, char* argv[])
catch(const Casino::OutOfChipsException&)
{
cout << "(" << player->ice_getIdentity().name << " is out) " << flush;
-
+
players[i] = 0;
}
}
}
}
cout << " ok" << endl;
-
+
cout << "Live bets: " << bank->getLiveBetCount() << endl;
cout << "Sleep for 10 seconds" << endl;
IceUtil::ThreadControl::sleep(IceUtil::Time::seconds(10));
cout << "Live bets: " << bank->getLiveBetCount() << endl;
-
+
cout << "Ending balances" << endl;
printBalances(players);
-
+
cout << "Current bank earnings: " << bank->getEarnings() << " chips" << endl;
cout << "All chips accounted for? " << (bank->checkAllChips() ? "yes" : "no") << endl;
@@ -192,19 +191,19 @@ CasinoClient::run(int argc, char* argv[])
return 0;
}
-void
+void
CasinoClient::printBalances(Casino::PlayerPrxSeq& players) const
{
for(size_t i = 0; i < players.size(); ++i)
{
Casino::PlayerPrx player = players[i];
-
+
if(player != 0)
{
try
{
int chips = player->getChips();
- cout << player->ice_getIdentity().name << ": " << chips << " chips" << endl;
+ cout << player->ice_getIdentity().name << ": " << chips << " chips" << endl;
}
catch(const Ice::ObjectNotExistException&)
{
diff --git a/cpp/demo/Freeze/casino/PlayerI.cpp b/cpp/demo/Freeze/casino/PlayerI.cpp
index 7c1761c..8b58882 100644
--- a/cpp/demo/Freeze/casino/PlayerI.cpp
+++ b/cpp/demo/Freeze/casino/PlayerI.cpp
@@ -22,7 +22,7 @@ PlayerI::destroy(const Ice::Current& current)
_evictor->remove(current.id);
}
-void
+void
PlayerI::withdraw(int count, const Ice::Current&)
{
int newBalance = chips - count;
@@ -45,12 +45,11 @@ PlayerI::PlayerI() :
{
}
-void
-PlayerI::init(const CasinoStore::PersistentPlayerPrx& myPrx, const Freeze::TransactionalEvictorPtr& evictor,
+void
+PlayerI::init(const CasinoStore::PersistentPlayerPrx& myPrx, const Freeze::TransactionalEvictorPtr& evictor,
const CasinoStore::PersistentBankPrx& bank)
{
_myPrx = myPrx;
_evictor = evictor;
_bank = bank;
}
-
diff --git a/cpp/demo/Freeze/casino/PlayerI.h b/cpp/demo/Freeze/casino/PlayerI.h
index 909b5a2..c60a61e 100644
--- a/cpp/demo/Freeze/casino/PlayerI.h
+++ b/cpp/demo/Freeze/casino/PlayerI.h
@@ -21,16 +21,16 @@ public:
virtual int getChips(const Ice::Current&) const;
virtual void destroy(const Ice::Current&);
-
+
virtual void withdraw(int, const Ice::Current&);
-
+
virtual void win(int count, const Ice::Current&);
-
+
PlayerI();
- void init(const CasinoStore::PersistentPlayerPrx&, const Freeze::TransactionalEvictorPtr&,
+ void init(const CasinoStore::PersistentPlayerPrx&, const Freeze::TransactionalEvictorPtr&,
const CasinoStore::PersistentBankPrx&);
-
+
private:
CasinoStore::PersistentPlayerPrx _myPrx;
diff --git a/cpp/demo/Freeze/casino/Server.cpp b/cpp/demo/Freeze/casino/Server.cpp
index 5f78ebc..46138f8 100644
--- a/cpp/demo/Freeze/casino/Server.cpp
+++ b/cpp/demo/Freeze/casino/Server.cpp
@@ -36,40 +36,39 @@ private:
//
public:
#endif
+
CasinoStore::PersistentBankPrx _bankPrx;
Freeze::TransactionalEvictorPtr _bankEvictor;
Freeze::TransactionalEvictorPtr _playerEvictor;
Freeze::TransactionalEvictorPtr _betEvictor;
- BetResolver _betResolver;
+ BetResolver _betResolver;
int _bankEdge;
};
-int
+int
main(int argc, char* argv[])
{
CasinoServer app("db");
return app.main(argc, argv, "config.server");
}
-
template<class T>
class ObjectFactory : public Ice::ObjectFactory
{
public:
-
+
virtual Ice::ObjectPtr
create(const string& type)
{
return new T;
}
-
+
virtual void
destroy()
{
}
};
-
int
CasinoServer::run(int argc, char* argv[])
{
@@ -92,7 +91,7 @@ CasinoServer::run(int argc, char* argv[])
_bankEdge = 1;
}
cout << "Bank edge is " << _bankEdge << endl;
-
+
//
// Create an object adapter
//
@@ -104,15 +103,15 @@ CasinoServer::run(int argc, char* argv[])
communicator()->addObjectFactory(new ObjectFactory<BankI>, CasinoStore::PersistentBank::ice_staticId());
communicator()->addObjectFactory(new ObjectFactory<PlayerI>, CasinoStore::PersistentPlayer::ice_staticId());
communicator()->addObjectFactory(new ObjectFactory<BetI>, CasinoStore::PersistentBet::ice_staticId());
-
+
//
// Create evictors; each type gets its own type-specific evictor
//
-
+
//
// Bank evictor
//
-
+
class BankInitializer : public Freeze::ServantInitializer
{
public:
@@ -122,21 +121,24 @@ CasinoServer::run(int argc, char* argv[])
{
}
- virtual void
- initialize(const Ice::ObjectAdapterPtr& adapter, const Ice::Identity& identity, const string& facet, const Ice::ObjectPtr& servant)
+ virtual void
+ initialize(const Ice::ObjectAdapterPtr& adapter, const Ice::Identity& identity, const string& facet,
+ const Ice::ObjectPtr& servant)
{
BankI* bank = dynamic_cast<BankI*>(servant.get());
- bank->init(_server._bankPrx, _server._bankEvictor, _server._playerEvictor, _server._betEvictor, _server._betResolver, _server._bankEdge);
+ bank->init(_server._bankPrx, _server._bankEvictor, _server._playerEvictor, _server._betEvictor,
+ _server._betResolver, _server._bankEdge);
}
+
private:
CasinoServer& _server;
};
_bankEvictor =
- Freeze::createTransactionalEvictor(adapter, _envName, "bank",
+ Freeze::createTransactionalEvictor(adapter, _envName, "bank",
createTypeMap(CasinoStore::PersistentBank::ice_staticId()),
new BankInitializer(*this));
-
+
int size = properties->getPropertyAsInt("Bank.EvictorSize");
if(size > 0)
{
@@ -145,7 +147,6 @@ CasinoServer::run(int argc, char* argv[])
adapter->addServantLocator(_bankEvictor, "bank");
-
//
// Player evictor
//
@@ -158,33 +159,34 @@ CasinoServer::run(int argc, char* argv[])
_server(server)
{
}
-
- virtual void
- initialize(const Ice::ObjectAdapterPtr& adapter, const Ice::Identity& identity, const string& facet, const Ice::ObjectPtr& servant)
+
+ virtual void
+ initialize(const Ice::ObjectAdapterPtr& adapter, const Ice::Identity& identity, const string& facet,
+ const Ice::ObjectPtr& servant)
{
- CasinoStore::PersistentPlayerPrx prx =
+ CasinoStore::PersistentPlayerPrx prx =
CasinoStore::PersistentPlayerPrx::uncheckedCast(adapter->createProxy(identity));
-
+
PlayerI* player = dynamic_cast<PlayerI*>(servant.get());
player->init(prx, _server._playerEvictor, _server._bankPrx);
}
+
private:
CasinoServer& _server;
};
-
+
_playerEvictor =
- Freeze::createTransactionalEvictor(adapter, _envName, "player",
+ Freeze::createTransactionalEvictor(adapter, _envName, "player",
createTypeMap(CasinoStore::PersistentPlayer::ice_staticId()),
new PlayerInitializer(*this));
-
+
size = properties->getPropertyAsInt("Player.EvictorSize");
if(size > 0)
{
_playerEvictor->setSize(size);
}
-
- adapter->addServantLocator(_playerEvictor, "player");
+ adapter->addServantLocator(_playerEvictor, "player");
//
// Bet evictor
@@ -198,19 +200,21 @@ CasinoServer::run(int argc, char* argv[])
_server(server)
{
}
-
- virtual void
- initialize(const Ice::ObjectAdapterPtr& adapter, const Ice::Identity& identity, const string& facet, const Ice::ObjectPtr& servant)
- {
+
+ virtual void
+ initialize(const Ice::ObjectAdapterPtr& adapter, const Ice::Identity& identity, const string& facet,
+ const Ice::ObjectPtr& servant)
+ {
BetI* bet = dynamic_cast<BetI*>(servant.get());
bet->init(_server._betEvictor, _server._bankEdge);
}
+
private:
CasinoServer& _server;
};
_betEvictor =
- Freeze::createTransactionalEvictor(adapter, _envName, "bet",
+ Freeze::createTransactionalEvictor(adapter, _envName, "bet",
createTypeMap(CasinoStore::PersistentBet::ice_staticId()),
new BetInitializer(*this));
size = properties->getPropertyAsInt("Bet.EvictorSize");
@@ -220,7 +224,6 @@ CasinoServer::run(int argc, char* argv[])
}
adapter->addServantLocator(_betEvictor, "bet");
-
//
// Prepare startup
@@ -233,27 +236,31 @@ CasinoServer::run(int argc, char* argv[])
//
// Retrieve / create the bank
//
-
+
Ice::Identity bankId = communicator()->stringToIdentity("bank/Montecito");
_bankPrx = CasinoStore::PersistentBankPrx::uncheckedCast(adapter->createProxy(bankId));
-
+
if(!_bankEvictor->hasObject(bankId))
{
- _bankEvictor->add(new BankI(_bankPrx, _bankEvictor, _playerEvictor, _betEvictor, _betResolver, _bankEdge), bankId);
+ _bankEvictor->add(new BankI(_bankPrx, _bankEvictor, _playerEvictor, _betEvictor, _betResolver, _bankEdge),
+ bankId);
}
-
+
//
// reload existing bets into the bet resolver
//
-
+
_bankPrx->reloadBets();
-
+
//
// Create players / recreate missing players
//
- const string players[] = { "al", "bob", "charlie", "dave", "ed", "fred", "gene", "herb", "irvin", "joe", "ken", "lance" };
-
+ const string players[] =
+ {
+ "al", "bob", "charlie", "dave", "ed", "fred", "gene", "herb", "irvin", "joe", "ken", "lance"
+ };
+
for(size_t i = 0; i < 12; ++i)
{
#if defined(_MSC_VER) && (_MSC_VER < 1300)
@@ -267,16 +274,16 @@ CasinoServer::run(int argc, char* argv[])
{
_playerEvictor->add(new PlayerI, ident);
}
- }
-
+ }
+
//
// Everything is ready, activate
//
adapter->activate();
-
+
shutdownOnInterrupt();
communicator()->waitForShutdown();
-
+
_betResolver.destroy();
}
catch(...)
diff --git a/cpp/demo/Freeze/library/Makefile b/cpp/demo/Freeze/library/Makefile
index b8c0954..d64f5a7 100644
--- a/cpp/demo/Freeze/library/Makefile
+++ b/cpp/demo/Freeze/library/Makefile
@@ -46,7 +46,7 @@ SLICE_SRCS = Library.ice
include $(top_srcdir)/config/Make.rules
-CPPFLAGS := -I. $(READLINE_FLAGS) $(CPPFLAGS)
+CPPFLAGS := -I. $(CPPFLAGS) $(READLINE_FLAGS)
SLICE2CPPFLAGS := --ice $(SLICE2CPPFLAGS)
$(CLIENT): $(OBJS) $(COBJS)
diff --git a/cpp/demo/Freeze/phonebook/Makefile b/cpp/demo/Freeze/phonebook/Makefile
index 3fe93a4..128efb1 100644
--- a/cpp/demo/Freeze/phonebook/Makefile
+++ b/cpp/demo/Freeze/phonebook/Makefile
@@ -47,7 +47,7 @@ SLICE_SRCS = PhoneBook.ice
include $(top_srcdir)/config/Make.rules
-CPPFLAGS := -I. $(READLINE_FLAGS) $(CPPFLAGS)
+CPPFLAGS := -I. $(CPPFLAGS) $(READLINE_FLAGS)
$(CLIENT): $(OBJS) $(COBJS)
rm -f $@
diff --git a/cpp/demo/Ice/MFC/client/HelloClient.rc b/cpp/demo/Ice/MFC/client/HelloClient.rc
index ad046d0..983bbd0 100755
--- a/cpp/demo/Ice/MFC/client/HelloClient.rc
+++ b/cpp/demo/Ice/MFC/client/HelloClient.rc
@@ -101,8 +101,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,4,0,0
- PRODUCTVERSION 3,4,0,0
+ FILEVERSION 3,4,1,0
+ PRODUCTVERSION 3,4,1,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -119,12 +119,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "ZeroC, Inc."
VALUE "FileDescription", "Ice Hello Client"
- VALUE "FileVersion", "3.4.0"
+ VALUE "FileVersion", "3.4.1"
VALUE "InternalName", "HelloClient.exe"
VALUE "LegalCopyright", "Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved."
VALUE "OriginalFilename", "HelloClient.exe"
VALUE "ProductName", "Ice"
- VALUE "ProductVersion", "3.4.0"
+ VALUE "ProductVersion", "3.4.1"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/demo/Ice/MFC/client/Makefile.mak b/cpp/demo/Ice/MFC/client/Makefile.mak
old mode 100644
new mode 100755
diff --git a/cpp/demo/Ice/MFC/client/stdafx.h b/cpp/demo/Ice/MFC/client/stdafx.h
index 1112d4e..7126aeb 100644
--- a/cpp/demo/Ice/MFC/client/stdafx.h
+++ b/cpp/demo/Ice/MFC/client/stdafx.h
@@ -33,13 +33,19 @@
#endif
#ifndef WINVER
-# if defined(_MSC_VER) && _MSC_VER > 1300
+# if defined(_MSC_VER) && _MSC_VER > 1300 && _MSC_VER < 1600
# define WINVER 0x0400
+# elif defined(_MSC_VER) && _MSC_VER >=1600
+ # define WINVER 0x0501
# endif
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
-#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
+# if defined(_MSC_VER) && _MSC_VER >=1600
+# define _WIN32_IE 0x0500 // Change this to the appropriate value to target IE 5.0 or later.
+# else
+# define _WIN32_IE 0x0400
+# endif
#endif
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
diff --git a/cpp/demo/Ice/MFC/server/HelloServer.rc b/cpp/demo/Ice/MFC/server/HelloServer.rc
index 1bcc14e..c50557c 100644
--- a/cpp/demo/Ice/MFC/server/HelloServer.rc
+++ b/cpp/demo/Ice/MFC/server/HelloServer.rc
@@ -92,8 +92,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 3,4,0,0
- PRODUCTVERSION 3,4,0,0
+ FILEVERSION 3,4,1,0
+ PRODUCTVERSION 3,4,1,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -110,12 +110,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "ZeroC, Inc.\0"
VALUE "FileDescription", "Ice Hello Server\0"
- VALUE "FileVersion", "3.4.0\0"
+ VALUE "FileVersion", "3.4.1\0"
VALUE "InternalName", "HelloServer.exe\0"
VALUE "LegalCopyright", "Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "HelloServer.exe\0"
VALUE "ProductName", "Ice\0"
- VALUE "ProductVersion", "3.4.0\0"
+ VALUE "ProductVersion", "3.4.1\0"
END
END
BLOCK "VarFileInfo"
diff --git a/cpp/demo/Ice/MFC/server/stdafx.h b/cpp/demo/Ice/MFC/server/stdafx.h
index 1112d4e..7126aeb 100644
--- a/cpp/demo/Ice/MFC/server/stdafx.h
+++ b/cpp/demo/Ice/MFC/server/stdafx.h
@@ -33,13 +33,19 @@
#endif
#ifndef WINVER
-# if defined(_MSC_VER) && _MSC_VER > 1300
+# if defined(_MSC_VER) && _MSC_VER > 1300 && _MSC_VER < 1600
# define WINVER 0x0400
+# elif defined(_MSC_VER) && _MSC_VER >=1600
+ # define WINVER 0x0501
# endif
#endif
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
-#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
+# if defined(_MSC_VER) && _MSC_VER >=1600
+# define _WIN32_IE 0x0500 // Change this to the appropriate value to target IE 5.0 or later.
+# else
+# define _WIN32_IE 0x0400
+# endif
#endif
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
diff --git a/cpp/demo/Ice/Makefile.mak b/cpp/demo/Ice/Makefile.mak
index 5c8f591..5989f97 100644
--- a/cpp/demo/Ice/Makefile.mak
+++ b/cpp/demo/Ice/Makefile.mak
@@ -32,7 +32,7 @@ SUBDIRS = $(SUBDIRS) \
invoke
!endif
-!if "$(BCPLUSPLUS)" != "yes" && "$(CPP_COMPILER)" != "VC90_EXPRESS"
+!if "$(BCPLUSPLUS)" != "yes" && "$(CPP_COMPILER)" != "VC90_EXPRESS" && "$(CPP_COMPILER)" != "VC100_EXPRESS"
SUBDIRS = $(SUBDIRS) \
MFC
!endif
diff --git a/cpp/demo/Ice/plugin/Ice.plugin.hello.vcproj b/cpp/demo/Ice/plugin/Ice.plugin.hello.vcproj
index 39f7c51..079edc5 100755
--- a/cpp/demo/Ice/plugin/Ice.plugin.hello.vcproj
+++ b/cpp/demo/Ice/plugin/Ice.plugin.hello.vcproj
@@ -86,10 +86,10 @@
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\..\cpp\lib"
GenerateDebugInformation="true"
- ProgramDatabaseFile=".\Debug/helloplugin34d.pdb"
+ ProgramDatabaseFile="helloplugin34d.pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
- ImportLibrary=".\Debug/helloplugin34d.lib"
+ ImportLibrary="helloplugin34d.lib"
TargetMachine="1"
/>
<Tool
@@ -114,7 +114,6 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="copy $(OutDir)\helloplugin34d.* ."
/>
</Configuration>
<Configuration
@@ -186,7 +185,7 @@
AdditionalLibraryDirectories="..\..\..\..\cpp\lib"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
- ImportLibrary=".\Release/helloplugin34.lib"
+ ImportLibrary="helloplugin34.lib"
TargetMachine="1"
/>
<Tool
@@ -281,10 +280,10 @@
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\..\cpp\lib"
GenerateDebugInformation="true"
- ProgramDatabaseFile=".\Debug/helloplugin34d.pdb"
+ ProgramDatabaseFile="helloplugin34d.pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
- ImportLibrary=".\Debug/helloplugin34d.lib"
+ ImportLibrary="helloplugin34d.lib"
TargetMachine="17"
/>
<Tool
@@ -309,7 +308,6 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="copy $(OutDir)\helloplugin34d.* ."
/>
</Configuration>
<Configuration
@@ -381,7 +379,7 @@
AdditionalLibraryDirectories="..\..\..\..\cpp\lib"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
- ImportLibrary=".\Release/helloplugin34.lib"
+ ImportLibrary="helloplugin34.lib"
TargetMachine="17"
/>
<Tool
diff --git a/cpp/demo/Ice/plugin/Ice.plugin.logger.vcproj b/cpp/demo/Ice/plugin/Ice.plugin.logger.vcproj
index de63537..4cd334c 100755
--- a/cpp/demo/Ice/plugin/Ice.plugin.logger.vcproj
+++ b/cpp/demo/Ice/plugin/Ice.plugin.logger.vcproj
@@ -86,10 +86,10 @@
SuppressStartupBanner="true"
AdditionalLibraryDirectories="..\..\..\..\cpp\lib"
GenerateDebugInformation="true"
- ProgramDatabaseFile=".\Debug/loggerplugin34d.pdb"
+ ProgramDatabaseFile="loggerplugin34d.pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
- ImportLibrary=".\Debug/loggerplugin34d.lib"
+ ImportLibrary="loggerplugin34d.lib"
TargetMachine="1"
/>
<Tool
@@ -114,7 +114,6 @@
/>
<Tool
Name="VCPostBuildEventTool"
- CommandLine="copy $(OutDir)\loggerplugin34d.* ."
/>
</Configuration>
<Configuration
@@ -186,7 +185,7 @@
... 1547326 lines suppressed ...
--
asterisk-scf/integration/ice.git
More information about the asterisk-scf-commits
mailing list