diff options
author | Joe George <joe@zeroc.com> | 2015-09-11 14:30:00 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2015-09-11 14:30:00 -0400 |
commit | b9c2a6f6628476f11c78a7de2adc90edca1e209e (patch) | |
tree | df192d87dfbc594a7a2b52a96b5145ad3156d26f /cpp/src | |
parent | ICE-6645 Removed hack to keep binary compatibility in Ice 3.6.1 (diff) | |
parent | Removed ARM configuraton from WinRT testsuite solutions (diff) | |
download | ice-b9c2a6f6628476f11c78a7de2adc90edca1e209e.tar.bz2 ice-b9c2a6f6628476f11c78a7de2adc90edca1e209e.tar.xz ice-b9c2a6f6628476f11c78a7de2adc90edca1e209e.zip |
Merge remote-tracking branch 'origin/3.6'
Diffstat (limited to 'cpp/src')
108 files changed, 1143 insertions, 636 deletions
diff --git a/cpp/src/Freeze/.depend.mak b/cpp/src/Freeze/.depend.mak index 372299c5308..0f96c3f9385 100755 --- a/cpp/src/Freeze/.depend.mak +++ b/cpp/src/Freeze/.depend.mak @@ -191,6 +191,7 @@ BackgroundSaveEvictorI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\Freeze.h" \ "$(includedir)\Freeze\Initialize.h" \ "$(includedir)\Freeze\EvictorF.h" \ @@ -339,6 +340,7 @@ Catalog.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -468,6 +470,7 @@ CatalogIndexList.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -597,6 +600,7 @@ ConnectionI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\EvictorF.h" \ "$(includedir)\Freeze\ConnectionF.h" \ "$(includedir)\Freeze\Index.h" \ @@ -736,6 +740,7 @@ EvictorI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\Freeze.h" \ "$(includedir)\Freeze\Initialize.h" \ "$(includedir)\Freeze\EvictorF.h" \ @@ -882,6 +887,7 @@ EvictorIteratorI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\Freeze.h" \ "$(includedir)\Freeze\Initialize.h" \ "$(includedir)\Freeze\EvictorF.h" \ @@ -1034,6 +1040,7 @@ Index.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "IndexI.h" \ "EvictorI.h" \ @@ -1186,6 +1193,7 @@ IndexI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\Index.h" \ "$(includedir)\Freeze\DB.h" \ "EvictorI.h" \ @@ -1343,6 +1351,7 @@ MapDb.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\EvictorF.h" \ "$(includedir)\Freeze\ConnectionF.h" \ "$(includedir)\Freeze\Index.h" \ @@ -1479,6 +1488,7 @@ MapI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -1620,6 +1630,7 @@ ObjectStore.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\EvictorStorage.h" \ "$(includedir)\Freeze\Index.h" \ @@ -1775,6 +1786,7 @@ SharedDbEnv.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -1932,6 +1944,7 @@ TransactionalEvictorContext.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\TransactionalEvictor.h" \ "$(includedir)\Freeze\Evictor.h" \ "$(includedir)\Freeze\Exception.h" \ @@ -2095,6 +2108,7 @@ TransactionalEvictorI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\Freeze.h" \ "$(includedir)\Freeze\Initialize.h" \ "$(includedir)\Freeze\EvictorF.h" \ @@ -2276,6 +2290,7 @@ TransactionI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\EvictorF.h" \ "$(includedir)\Freeze\ConnectionF.h" \ "$(includedir)\Freeze\Index.h" \ @@ -2406,6 +2421,7 @@ Util.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ diff --git a/cpp/src/Freeze/BackgroundSaveEvictorI.cpp b/cpp/src/Freeze/BackgroundSaveEvictorI.cpp index c0e1eabac49..f3f9e949d98 100644 --- a/cpp/src/Freeze/BackgroundSaveEvictorI.cpp +++ b/cpp/src/Freeze/BackgroundSaveEvictorI.cpp @@ -1034,8 +1034,8 @@ Freeze::BackgroundSaveEvictorI::run() else { DatabaseException ex(__FILE__, __LINE__); - ex.message = string(typeid(*element->rec.servant).name()) - + " does not implement IceUtil::AbstractMutex"; + Ice::Object& servant = *element->rec.servant; + ex.message = string(typeid(servant).name()) + " does not implement IceUtil::AbstractMutex"; throw ex; } } diff --git a/cpp/src/Freeze/Freeze.rc b/cpp/src/Freeze/Freeze.rc index da8c9b4d968..8f4a16d9296 100644 --- a/cpp/src/Freeze/Freeze.rc +++ b/cpp/src/Freeze/Freeze.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Freeze DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Freeze C++ Library\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/Freeze/Makefile.mak b/cpp/src/Freeze/Makefile.mak index a6e79803a3c..ebd62cc115e 100644 --- a/cpp/src/Freeze/Makefile.mak +++ b/cpp/src/Freeze/Makefile.mak @@ -51,7 +51,9 @@ SDIR = $(slicedir)\Freeze !include $(top_srcdir)/config/Make.rules.mak -CPPFLAGS = -I.. $(CPPFLAGS) -DFREEZE_API_EXPORTS -DWIN32_LEAN_AND_MEAN +$(OBJS) : $(DB_NUPKG) + +CPPFLAGS = -I.. $(CPPFLAGS) -DFREEZE_API_EXPORTS -DWIN32_LEAN_AND_MEAN $(DB_CPPFLAGS) SLICE2CPPFLAGS = --ice --include-dir Freeze --dll-export FREEZE_API $(SLICE2CPPFLAGS) LINKWITH = $(LIBS) $(DB_LIBS) @@ -64,7 +66,7 @@ RES_FILE = Freeze.res $(LIBNAME): $(DLLNAME) $(DLLNAME): $(OBJS) Freeze.res - $(LINK) $(BASE):0x25000000 $(LD_DLLFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) $(RES_FILE) + $(LINK) $(BASE):0x25000000 $(LD_DLLFLAGS) $(DB_LDFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) $(RES_FILE) move $(DLLNAME:.dll=.lib) $(LIBNAME) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest diff --git a/cpp/src/FreezeScript/.depend.mak b/cpp/src/FreezeScript/.depend.mak index 71532fcdd39..2a99698be24 100755 --- a/cpp/src/FreezeScript/.depend.mak +++ b/cpp/src/FreezeScript/.depend.mak @@ -121,6 +121,7 @@ AssignVisitor.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Slice\Parser.h" \ "Error.h" \ "Util.h" \ @@ -248,6 +249,7 @@ Data.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Slice\Parser.h" \ "Error.h" \ "Util.h" \ @@ -455,6 +457,7 @@ Functions.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Slice\Parser.h" \ "Error.h" \ "Util.h" \ @@ -590,6 +593,7 @@ Parser.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Slice\Parser.h" \ "Error.h" \ "GrammarUtil.h" \ @@ -716,6 +720,7 @@ Print.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Slice\Parser.h" \ "Error.h" \ "Util.h" \ @@ -848,6 +853,7 @@ Util.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -981,6 +987,7 @@ Grammar.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Slice\Parser.h" \ "Error.h" \ @@ -1108,6 +1115,7 @@ Scanner.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Slice\Parser.h" \ "Error.h" \ "Grammar.h" \ @@ -1313,6 +1321,7 @@ TransformVisitor.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Slice\Parser.h" \ "Error.h" \ "Util.h" \ @@ -1440,6 +1449,7 @@ Transformer.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Slice\Parser.h" \ "$(includedir)\Freeze\Connection.h" \ "$(includedir)\Freeze\Transaction.h" \ @@ -1585,6 +1595,7 @@ transformdb.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Slice\Parser.h" \ "$(includedir)\Freeze\Connection.h" \ "$(includedir)\Freeze\Transaction.h" \ @@ -1730,6 +1741,7 @@ DumpDescriptors.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Slice\Parser.h" \ "Error.h" \ "..\..\src\IceXML\Parser.h" \ @@ -1864,6 +1876,7 @@ DumpDB.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Slice\Parser.h" \ "Error.h" \ "..\..\src\IceXML\Parser.h" \ diff --git a/cpp/src/FreezeScript/DumpDB.rc b/cpp/src/FreezeScript/DumpDB.rc index b6d2ba968e1..caf03255337 100644 --- a/cpp/src/FreezeScript/DumpDB.rc +++ b/cpp/src/FreezeScript/DumpDB.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Dump Database\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Dump Freeze Database\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "dumpdb\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "dumpdb.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/FreezeScript/Makefile.mak b/cpp/src/FreezeScript/Makefile.mak index b95bf9e4814..6743beb4dc4 100644 --- a/cpp/src/FreezeScript/Makefile.mak +++ b/cpp/src/FreezeScript/Makefile.mak @@ -41,7 +41,9 @@ HDIR = $(headerdir)\FreezeScript !include $(top_srcdir)/config/Make.rules.mak -CPPFLAGS = -I.. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN +$(OBJS) : $(DB_NUPKG) + +CPPFLAGS = -I.. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN $(DB_CPPFLAGS) BISONFLAGS = --name-prefix "freeze_script_" $(BISONFLAGS) LINKWITH = $(LIBS) $(DB_LIBS) @@ -55,7 +57,7 @@ TRES_FILE = TransformDB.res DRES_FILE = DumpDB.res $(TRANSFORMDB): $(TRANSFORM_OBJS) $(COMMON_OBJS) TransformDB.res - $(LINK) $(LD_EXEFLAGS) $(TPDBFLAGS) $(TRANSFORM_OBJS) $(COMMON_OBJS) $(SETARGV) $(PREOUT)$@ \ + $(LINK) $(LD_EXEFLAGS) $(DB_LDFLAGS) $(TPDBFLAGS) $(TRANSFORM_OBJS) $(COMMON_OBJS) $(SETARGV) $(PREOUT)$@ \ $(PRELIBS)$(LINKWITH) $(TRES_FILE) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest @@ -63,7 +65,7 @@ $(TRANSFORMDB): $(TRANSFORM_OBJS) $(COMMON_OBJS) TransformDB.res signtool sign /f "$(SIGN_CERTIFICATE)" /p $(SIGN_PASSWORD) /t $(SIGN_TIMESTAMPSERVER) $@ $(DUMPDB): $(DUMP_OBJS) $(COMMON_OBJS) DumpDB.res - $(LINK) $(LD_EXEFLAGS) $(DPDBFLAGS) $(DUMP_OBJS) $(COMMON_OBJS) $(SETARGV) $(PREOUT)$@ \ + $(LINK) $(LD_EXEFLAGS) $(DB_LDFLAGS) $(DPDBFLAGS) $(DUMP_OBJS) $(COMMON_OBJS) $(SETARGV) $(PREOUT)$@ \ $(PRELIBS)$(LINKWITH) $(DRES_FILE) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest diff --git a/cpp/src/FreezeScript/TransformDB.rc b/cpp/src/FreezeScript/TransformDB.rc index 0f2c4541957..d7e88cf9a57 100644 --- a/cpp/src/FreezeScript/TransformDB.rc +++ b/cpp/src/FreezeScript/TransformDB.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Transform Database\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Transform Freeze Database\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "transformdb\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "transformdb.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/Glacier2/.depend.mak b/cpp/src/Glacier2/.depend.mak index cd5f7f35adc..dbbebc99a67 100755 --- a/cpp/src/Glacier2/.depend.mak +++ b/cpp/src/Glacier2/.depend.mak @@ -130,6 +130,7 @@ Blobject.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "RequestQueue.h" \ "Instrumentation.h" \ "Instance.h" \ @@ -264,6 +265,7 @@ ClientBlobject.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "RequestQueue.h" \ "Instrumentation.h" \ "Instance.h" \ @@ -498,6 +500,7 @@ FilterManager.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Instrumentation.h" \ "ProxyVerifier.h" \ "SessionRouterI.h" \ @@ -633,6 +636,7 @@ Glacier2Router.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Instance.h" \ "RequestQueue.h" \ "Instrumentation.h" \ @@ -771,6 +775,7 @@ Instance.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Glacier2\PermissionsVerifierF.h" \ "$(includedir)\Glacier2\Router.h" \ "$(includedir)\Glacier2\Session.h" \ @@ -1017,6 +1022,7 @@ ProxyVerifier.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ RequestQueue.obj: \ RequestQueue.cpp \ @@ -1139,6 +1145,7 @@ RequestQueue.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Instrumentation.h" \ "Instance.h" \ "ProxyVerifier.h" \ @@ -1274,6 +1281,7 @@ RouterI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Instrumentation.h" \ "ProxyVerifier.h" \ "SessionRouterI.h" \ @@ -1411,6 +1419,7 @@ RoutingTable.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "ProxyVerifier.h" \ "Instrumentation.h" \ @@ -1536,6 +1545,7 @@ ServerBlobject.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "RequestQueue.h" \ "Instrumentation.h" \ "Instance.h" \ @@ -1669,6 +1679,7 @@ SessionRouterI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Glacier2\PermissionsVerifierF.h" \ "$(includedir)\Glacier2\Router.h" \ "$(includedir)\Glacier2\Session.h" \ diff --git a/cpp/src/Glacier2/Glacier2Router.rc b/cpp/src/Glacier2/Glacier2Router.rc index eb98d597c8d..6b0ec925bfa 100644 --- a/cpp/src/Glacier2/Glacier2Router.rc +++ b/cpp/src/Glacier2/Glacier2Router.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -19,12 +19,12 @@ BEGIN BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "Glacier2 Router\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "glacier2router\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "glacier2router.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/Glacier2CryptPermissionsVerifier/.depend.mak b/cpp/src/Glacier2CryptPermissionsVerifier/.depend.mak index 0c7c501d970..04379acb469 100755 --- a/cpp/src/Glacier2CryptPermissionsVerifier/.depend.mak +++ b/cpp/src/Glacier2CryptPermissionsVerifier/.depend.mak @@ -129,6 +129,7 @@ CryptPermissionsVerifierI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "..\..\src\IceUtil\FileUtil.h" \ "$(includedir)\IceUtil\StringUtil.h" \ "$(includedir)\IceUtil\InputUtil.h" \ diff --git a/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifier.rc b/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifier.rc index 9a8b26fd008..93f014e1aba 100644 --- a/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifier.rc +++ b/cpp/src/Glacier2CryptPermissionsVerifier/CryptPermissionsVerifier.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Glacier2CryptPermissionsVerifier DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Glacier2CryptPermissionsVerifier C++ Plug-in\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/Glacier2Lib/.depend.mak b/cpp/src/Glacier2Lib/.depend.mak index b5ed5f1053b..86d87da9935 100755 --- a/cpp/src/Glacier2Lib/.depend.mak +++ b/cpp/src/Glacier2Lib/.depend.mak @@ -155,6 +155,7 @@ Application.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Glacier2\Session.h" \ "$(includedir)\Glacier2\SSLInfo.h" \ "$(includedir)\Glacier2\Config.h" \ @@ -293,6 +294,7 @@ NullPermissionsVerifier.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ SessionHelper.obj: \ SessionHelper.cpp \ @@ -415,6 +417,7 @@ SessionHelper.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Glacier2\Session.h" \ "$(includedir)\Glacier2\SSLInfo.h" \ "$(includedir)\Glacier2\Config.h" \ diff --git a/cpp/src/Glacier2Lib/Glacier2.rc b/cpp/src/Glacier2Lib/Glacier2.rc index 80e912ac7c0..d05682f8412 100644 --- a/cpp/src/Glacier2Lib/Glacier2.rc +++ b/cpp/src/Glacier2Lib/Glacier2.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Glacier2 DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Glacier2 C++ Client Library\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/Glacier2Lib/SessionHelper.cpp b/cpp/src/Glacier2Lib/SessionHelper.cpp index 0ebfeaa98aa..7ce2d2c3eb9 100644 --- a/cpp/src/Glacier2Lib/SessionHelper.cpp +++ b/cpp/src/Glacier2Lib/SessionHelper.cpp @@ -94,6 +94,7 @@ public: Ice::ObjectAdapterPtr objectAdapter(); friend class DestroyInternal; + friend class DestroyCommunicator; friend class ConnectThread; friend class DispatchCallThread; friend class Glacier2::SessionFactoryHelper; @@ -103,6 +104,7 @@ private: Ice::ObjectAdapterPtr internalObjectAdapter(); void connected(const Glacier2::RouterPrx&, const Glacier2::SessionPrx&); void destroyInternal(const Ice::DispatcherCallPtr&); + void destroyCommunicator(); void connectFailed(); void connect(const std::map<std::string, std::string>&); @@ -163,6 +165,27 @@ private: const Ice::DispatcherCallPtr _disconnected; }; +class DestroyCommunicator : public IceUtil::Thread +{ + +public: + + DestroyCommunicator(const SessionHelperIPtr& session) : + _session(session) + { + } + + virtual void run() + { + _session->destroyCommunicator(); + _session = 0; + } + +private: + + SessionHelperIPtr _session; +}; + } SessionHelperI::SessionHelperI(const Glacier2::SessionThreadCallbackPtr& threadCB, @@ -193,12 +216,13 @@ SessionHelperI::destroy() if(!_connected) { // - // In this case a connecting session is being - // destroyed. The communicator and session will be - // destroyed when the connection establishment has - // completed. + // In this case a connecting session is being destroyed. + // We destroy the communicator to trigger the immediate + // failure of the connection establishment. // + IceUtil::ThreadPtr destroyCommunicator = new DestroyCommunicator(this); _threadCB = 0; + destroyCommunicator->start(); return; } @@ -424,6 +448,28 @@ SessionHelperI::destroyInternal(const Ice::DispatcherCallPtr& disconnected) } void +SessionHelperI::destroyCommunicator() +{ + Ice::CommunicatorPtr communicator; + { + IceUtil::Mutex::Lock sync(_mutex); + communicator = _communicator; + } + + if(communicator) + { + try + { + communicator->destroy(); + } + catch(...) + { + } + communicator = 0; + } +} + +void SessionHelperI::connectFailed() { Ice::CommunicatorPtr communicator; @@ -526,6 +572,11 @@ public: { _communicator->setDefaultRouter(finder->getRouter()); } + catch(const Ice::CommunicatorDestroyedException& ex) + { + _session->dispatchCallback(new ConnectFailed(_callback, _session, ex), 0); + return; + } catch(const Ice::Exception&) { // diff --git a/cpp/src/Glacier2Lib/winrt/.depend.mak b/cpp/src/Glacier2Lib/winrt/.depend.mak index c894b4371e2..9eaf8985ee2 100755 --- a/cpp/src/Glacier2Lib/winrt/.depend.mak +++ b/cpp/src/Glacier2Lib/winrt/.depend.mak @@ -488,6 +488,7 @@ $(ARCH)\$(CONFIG)\SessionHelper.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Glacier2\Session.h" \ "$(includedir)\Glacier2\SSLInfo.h" \ "$(includedir)\Glacier2\Config.h" \ diff --git a/cpp/src/Ice/.depend.mak b/cpp/src/Ice/.depend.mak index 8da2ec3bf1f..729802a005d 100755 --- a/cpp/src/Ice/.depend.mak +++ b/cpp/src/Ice/.depend.mak @@ -501,6 +501,7 @@ Application.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "LoggerI.h" \ "..\..\src\IceUtil\FileUtil.h" \ "$(includedir)\IceUtil\CtrlCHandler.h" \ @@ -1814,6 +1815,7 @@ DefaultsAndOverrides.obj: \ DeprecatedStringConverter.obj: \ DeprecatedStringConverter.cpp \ + "$(includedir)\IceUtil\DisableWarnings.h" \ "$(includedir)\Ice\DeprecatedStringConverter.h" \ "$(includedir)\Ice\Config.h" \ "$(includedir)\IceUtil\Config.h" \ @@ -3205,7 +3207,7 @@ Instance.obj: \ "$(includedir)\Ice\MetricsAdminI.h" \ "$(includedir)\Ice\MetricsFunctional.h" \ "LoggerAdminI.h" \ - "RegisterPlugins.h" \ + "RegisterPluginsInit.h" \ "$(includedir)\IceUtil\UUID.h" \ InstrumentationI.obj: \ @@ -6185,9 +6187,9 @@ ReferenceFactory.obj: \ "PropertyNames.h" \ "$(includedir)\IceUtil\StringUtil.h" \ -RegisterPlugins.obj: \ - RegisterPlugins.cpp \ - "RegisterPlugins.h" \ +RegisterPluginsInit.obj: \ + RegisterPluginsInit.cpp \ + "RegisterPluginsInit.h" \ "$(includedir)\Ice\CommunicatorF.h" \ "$(includedir)\IceUtil\PushDisableWarnings.h" \ "$(includedir)\Ice\ProxyF.h" \ @@ -7049,6 +7051,7 @@ Service.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "LoggerI.h" \ "Instance.h" \ "$(includedir)\IceUtil\RecMutex.h" \ @@ -9411,6 +9414,7 @@ DLLMain.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ BuiltinSequences.obj: \ BuiltinSequences.cpp \ diff --git a/cpp/src/Ice/ConnectRequestHandler.cpp b/cpp/src/Ice/ConnectRequestHandler.cpp index d69448743a9..caabcbd3e75 100644 --- a/cpp/src/Ice/ConnectRequestHandler.cpp +++ b/cpp/src/Ice/ConnectRequestHandler.cpp @@ -41,24 +41,9 @@ RequestHandlerPtr ConnectRequestHandler::connect(const Ice::ObjectPrx& proxy) { Lock sync(*this); - try - { - if(!initialized()) - { - _proxies.insert(proxy); - } - } - catch(const Ice::LocalException&) + if(!initialized()) { - // - // Only throw if the connection didn't get established. If - // it died after being established, we allow the caller to - // retry the connection establishment by not throwing here. - // - if(!_connection) - { - throw; - } + _proxies.insert(proxy); } return _requestHandler ? _requestHandler : this; } @@ -302,6 +287,16 @@ ConnectRequestHandler::initialized() if(_exception.get()) { + if(_connection) + { + // + // Only throw if the connection didn't get established. If + // it died after being established, we allow the caller to + // retry the connection establishment by not throwing here + // (the connection will throw RetryException). + // + return true; + } _exception->ice_throw(); return false; // Keep the compiler happy. } diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index ec04336d76c..a0faafc6145 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -1222,6 +1222,7 @@ IceInternal::IncomingConnectionFactory::flushAsyncBatchRequests(const Communicat bool IceInternal::IncomingConnectionFactory::startAsync(SocketOperation) { + assert(_acceptor); if(_state >= StateClosed) { return false; @@ -1245,6 +1246,7 @@ IceInternal::IncomingConnectionFactory::startAsync(SocketOperation) bool IceInternal::IncomingConnectionFactory::finishAsync(SocketOperation) { + assert(_acceptor); try { _acceptor->finishAccept(); @@ -1295,6 +1297,11 @@ IceInternal::IncomingConnectionFactory::message(ThreadPoolCurrent& current) _connections.erase(*p); } + if(!_acceptor) + { + return; + } + // // Now accept a new connection. // @@ -1411,7 +1418,14 @@ IceInternal::IncomingConnectionFactory::toString() const { return _transceiver->toString(); } - return _acceptor->toString(); + else if(_acceptor) + { + return _acceptor->toString(); + } + else + { + return string(); + } } NativeInfoPtr @@ -1421,9 +1435,14 @@ IceInternal::IncomingConnectionFactory::getNativeInfo() { return _transceiver->getNativeInfo(); } - - assert(_acceptor); - return _acceptor->getNativeInfo(); + else if(_acceptor) + { + return _acceptor->getNativeInfo(); + } + else + { + return 0; + } } void @@ -1705,6 +1724,7 @@ IceInternal::IncomingConnectionFactory::createAcceptor() if(_acceptor) { _acceptor->close(); + _acceptor = 0; } throw; } @@ -1722,4 +1742,13 @@ IceInternal::IncomingConnectionFactory::closeAcceptor() } _acceptor->close(); + +#if TARGET_OS_IPHONE != 0 + // + // Only clear the acceptor on iOS where it can be destroyed/re-created during the lifetime of the incoming + // connection factory. On other platforms, we keep it set. This is in particular import for IOCP/WinRT where + // finishAsync can be called after the acceptor is closed. + // + _acceptor = 0; +#endif } diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index f524ca3b8d2..49707d9e124 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -2002,6 +2002,14 @@ Ice::ConnectionI::finish(bool close) } _asyncRequests.clear(); + // + // Don't wait to be reaped to reclaim memory allocated by read/write streams. + // + _writeStream.clear(); + _writeStream.b.clear(); + _readStream.clear(); + _readStream.b.clear(); + if(_callback) { closeCallback(_callback); diff --git a/cpp/src/Ice/Ice.rc b/cpp/src/Ice/Ice.rc index 0f7c7ac24bc..89a41d5293a 100644 --- a/cpp/src/Ice/Ice.rc +++ b/cpp/src/Ice/Ice.rc @@ -2,8 +2,8 @@ #include "EventLoggerMsg.rc" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -23,13 +23,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Ice Core DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Ice C++ Core Library\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp index 655a37920de..bc29df15d75 100644 --- a/cpp/src/Ice/Initialize.cpp +++ b/cpp/src/Ice/Initialize.cpp @@ -40,6 +40,27 @@ makePair(const vector<Byte>& v) } } +IceUtil::Mutex* globalMutex = 0; +Ice::LoggerPtr processLogger; + +class Init +{ +public: + + Init() + { + globalMutex = new IceUtil::Mutex; + } + + ~Init() + { + delete globalMutex; + globalMutex = 0; + } +}; + +Init init; + } StringSeq @@ -303,36 +324,10 @@ Ice::createOutputStream(const CommunicatorPtr& communicator, const EncodingVersi return new OutputStreamI(communicator, v); } -static IceUtil::Mutex* processLoggerMutex = 0; -static Ice::LoggerPtr processLogger; - -namespace -{ - -class Init -{ -public: - - Init() - { - processLoggerMutex = new IceUtil::Mutex; - } - - ~Init() - { - delete processLoggerMutex; - processLoggerMutex = 0; - } -}; - -Init init; - -} - LoggerPtr Ice::getProcessLogger() { - IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(processLoggerMutex); + IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(globalMutex); if(processLogger == 0) { @@ -347,13 +342,14 @@ Ice::getProcessLogger() void Ice::setProcessLogger(const LoggerPtr& logger) { - IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(processLoggerMutex); - processLogger = logger; + IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(globalMutex); + processLogger = logger; } void Ice::registerPluginFactory(const std::string& name, PLUGIN_FACTORY factory, bool loadOnInitialize) { + IceUtilInternal::MutexPtrLock<IceUtil::Mutex> lock(globalMutex); PluginManagerI::registerPluginFactory(name, factory, loadOnInitialize); } diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 72455275be9..4b3590c01de 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -40,7 +40,7 @@ #include <Ice/InstrumentationI.h> #include <Ice/ProtocolInstance.h> #include <Ice/LoggerAdminI.h> -#include <Ice/RegisterPlugins.h> +#include <Ice/RegisterPluginsInit.h> #include <Ice/ObserverHelper.h> #include <IceUtil/StringUtil.h> diff --git a/cpp/src/Ice/LocatorInfo.cpp b/cpp/src/Ice/LocatorInfo.cpp index aa618dc2eed..b4ea96998b1 100644 --- a/cpp/src/Ice/LocatorInfo.cpp +++ b/cpp/src/Ice/LocatorInfo.cpp @@ -326,7 +326,7 @@ IceInternal::LocatorInfo::RequestCallback::response(const LocatorInfoPtr& locato // by the locator is an indirect proxy. We now need to resolve the endpoints // of this indirect proxy. // - locatorInfo->getEndpoints(r, _ref, _ttl, _callback); + locatorInfo->getEndpointsWithCallback(r, _ref, _ttl, _callback); return; } } @@ -620,10 +620,10 @@ IceInternal::LocatorInfo::getEndpoints(const ReferencePtr& ref, const ReferenceP } void -IceInternal::LocatorInfo::getEndpoints(const ReferencePtr& ref, - const ReferencePtr& wellKnownRef, - int ttl, - const GetEndpointsCallbackPtr& callback) +IceInternal::LocatorInfo::getEndpointsWithCallback(const ReferencePtr& ref, + const ReferencePtr& wellKnownRef, + int ttl, + const GetEndpointsCallbackPtr& callback) { assert(ref->isIndirect()); vector<EndpointIPtr> endpoints; @@ -664,7 +664,7 @@ IceInternal::LocatorInfo::getEndpoints(const ReferencePtr& ref, } else if(!r->isWellKnown()) { - getEndpoints(r, ref, ttl, callback); + getEndpointsWithCallback(r, ref, ttl, callback); return; } } diff --git a/cpp/src/Ice/LocatorInfo.h b/cpp/src/Ice/LocatorInfo.h index 5fc704cc673..b283a66bb8b 100644 --- a/cpp/src/Ice/LocatorInfo.h +++ b/cpp/src/Ice/LocatorInfo.h @@ -58,7 +58,7 @@ public: LocatorTable(); void clear(); - + bool getAdapterEndpoints(const std::string&, int, ::std::vector<EndpointIPtr>&); void addAdapterEndpoints(const std::string&, const ::std::vector<EndpointIPtr>&); ::std::vector<EndpointIPtr> removeAdapterEndpoints(const std::string&); @@ -66,7 +66,7 @@ public: bool getObjectReference(const Ice::Identity&, int, ReferencePtr&); void addObjectReference(const Ice::Identity&, const ReferencePtr&); ReferencePtr removeObjectReference(const Ice::Identity&); - + private: bool checkTTL(const IceUtil::Time&, int) const; @@ -82,7 +82,7 @@ public: class GetEndpointsCallback : virtual public IceUtil::Shared { public: - + virtual void setEndpoints(const std::vector<EndpointIPtr>&, bool) = 0; virtual void setException(const Ice::LocalException&) = 0; }; @@ -111,7 +111,7 @@ public: void addCallback(const ReferencePtr&, const ReferencePtr&, int, const GetEndpointsCallbackPtr&); std::vector<EndpointIPtr> getEndpoints(const ReferencePtr&, const ReferencePtr&, int, bool&); - + void response(const Ice::ObjectPrx&); void exception(const Ice::Exception&); @@ -157,12 +157,13 @@ public: { return getEndpoints(ref, 0, ttl, cached); } - void getEndpoints(const ReferencePtr& ref, int ttl, const GetEndpointsCallbackPtr& cb) + std::vector<EndpointIPtr> getEndpoints(const ReferencePtr&, const ReferencePtr&, int, bool&); + + void getEndpointsWithCallback(const ReferencePtr& ref, int ttl, const GetEndpointsCallbackPtr& cb) { - getEndpoints(ref, 0, ttl, cb); + getEndpointsWithCallback(ref, 0, ttl, cb); } - std::vector<EndpointIPtr> getEndpoints(const ReferencePtr&, const ReferencePtr&, int, bool&); - void getEndpoints(const ReferencePtr&, const ReferencePtr&, int, const GetEndpointsCallbackPtr&); + void getEndpointsWithCallback(const ReferencePtr&, const ReferencePtr&, int, const GetEndpointsCallbackPtr&); void clearCache(const ReferencePtr&); diff --git a/cpp/src/Ice/Makefile b/cpp/src/Ice/Makefile index 8d2fca43101..de6f29a4b6f 100644 --- a/cpp/src/Ice/Makefile +++ b/cpp/src/Ice/Makefile @@ -117,7 +117,7 @@ OBJS = Acceptor.o \ ProxyFactory.o \ Reference.o \ ReferenceFactory.o \ - RegisterPlugins.o \ + RegisterPluginsInit.o \ RequestHandler.o \ RequestHandlerFactory.o \ ResponseHandler.o \ @@ -167,6 +167,10 @@ SLICE2CPPFLAGS := --ice --include-dir Ice --dll-export ICE_API $(SLICE2CPPFLAGS) LINKWITH := -lIceUtil $(BZIP2_LIBS) $(ICE_OS_LIBS) $(ICONV_LIBS) +ifeq ($(UNAME),MINGW) +$(OBJS): $(BZIP2_NUPKG) +endif + ifeq ($(STATICLIBS),yes) $(libdir)/$(LIBNAME): $(OBJS) @mkdir -p $(dir $@) @@ -190,3 +194,6 @@ endif install:: all $(call installlib,$(DESTDIR)$(install_libdir),$(libdir),$(LIBFILENAME),$(SONAME),$(LIBNAME)) +ifeq ($(UNAME),MINGW) + $(call installlib,$(DESTDIR)$(install_libdir),$(BZIP2_HOME)/build/native/bin/$(PLATFORM),bzip2_mingw.dll,,) +endif
\ No newline at end of file diff --git a/cpp/src/Ice/Makefile.mak b/cpp/src/Ice/Makefile.mak index d3cdf104379..bdae62218d4 100644 --- a/cpp/src/Ice/Makefile.mak +++ b/cpp/src/Ice/Makefile.mak @@ -119,7 +119,7 @@ OBJS = .\Acceptor.obj \ .\ProxyFactory.obj \ .\Reference.obj \ .\ReferenceFactory.obj \ - .\RegisterPlugins.obj \ + .\RegisterPluginsInit.obj \ .\RequestHandler.obj \ .\RequestHandlerFactory.obj \ .\ResponseHandler.obj \ @@ -159,7 +159,9 @@ RC_SRCS = EventLoggerMsg.rc !include $(top_srcdir)\config\Make.rules.mak -CPPFLAGS = -I.. $(CPPFLAGS) -DICE_API_EXPORTS -DWIN32_LEAN_AND_MEAN -bigobj +$(OBJS) : $(BZIP2_NUPKG) + +CPPFLAGS = -I.. $(CPPFLAGS) -DICE_API_EXPORTS -DWIN32_LEAN_AND_MEAN -bigobj $(BZIP2_CPPFLAGS) !if "$(UNIQUE_DLL_NAMES)" == "yes" CPPFLAGS = $(CPPFLAGS) -DCOMPSUFFIX=\"$(COMPSUFFIX)\" !endif @@ -174,7 +176,7 @@ RES_FILE = Ice.res $(LIBNAME): $(DLLNAME) $(DLLNAME): $(OBJS) Ice.res - $(LINK) $(BASE):0x22000000 $(LD_DLLFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) $(RES_FILE) + $(LINK) $(BASE):0x22000000 $(LD_DLLFLAGS) $(BZIP2_LDFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) $(RES_FILE) move $(DLLNAME:.dll=.lib) $(LIBNAME) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest diff --git a/cpp/src/Ice/Network.h b/cpp/src/Ice/Network.h index f90e3d6da61..32182784a6d 100644 --- a/cpp/src/Ice/Network.h +++ b/cpp/src/Ice/Network.h @@ -152,6 +152,16 @@ enum SocketOperation }; // +// On WinRT, wait only for read to return, on IOCP/Win32 wait for +// both pending read and write operations to complete (#ICE-6695). +// +#if defined(ICE_OS_WINRT) +const int SocketOperationWaitForClose = 1; +#elif defined(ICE_USE_IOCP) +const int SocketOperationWaitForClose = 3; +#endif + +// // AsyncInfo struct for Windows IOCP or WinRT holds the result of // asynchronous operations after it completed. // diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index b2e556991d0..220811dda07 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -82,7 +82,6 @@ void Ice::ObjectAdapterI::activate() { LocatorInfoPtr locatorInfo; - bool registerProcess = false; bool printAdapterReady = false; { @@ -115,7 +114,6 @@ Ice::ObjectAdapterI::activate() { PropertiesPtr properties = _instance->initializationData().properties; printAdapterReady = properties->getPropertyAsInt("Ice.PrintAdapterReady") > 0; - registerProcess = properties->getPropertyAsInt(_name + ".RegisterProcess") > 0; } } @@ -123,7 +121,7 @@ Ice::ObjectAdapterI::activate() { Ice::Identity dummy; dummy.name = "dummy"; - updateLocatorRegistry(locatorInfo, createDirectProxy(dummy), registerProcess); + updateLocatorRegistry(locatorInfo, createDirectProxy(dummy)); } catch(const Ice::LocalException&) { @@ -227,7 +225,7 @@ Ice::ObjectAdapterI::deactivate() try { - updateLocatorRegistry(_locatorInfo, 0, false); + updateLocatorRegistry(_locatorInfo, 0); } catch(const Ice::LocalException&) { @@ -599,7 +597,6 @@ void Ice::ObjectAdapterI::refreshPublishedEndpoints() { LocatorInfoPtr locatorInfo; - bool registerProcess = false; vector<EndpointIPtr> oldPublishedEndpoints; { @@ -611,18 +608,13 @@ Ice::ObjectAdapterI::refreshPublishedEndpoints() _publishedEndpoints = parsePublishedEndpoints(); locatorInfo = _locatorInfo; - if(!_noConfig) - { - registerProcess = - _instance->initializationData().properties->getPropertyAsInt(_name + ".RegisterProcess") > 0; - } } try { Ice::Identity dummy; dummy.name = "dummy"; - updateLocatorRegistry(locatorInfo, createDirectProxy(dummy), registerProcess); + updateLocatorRegistry(locatorInfo, createDirectProxy(dummy)); } catch(const Ice::LocalException&) { @@ -1246,169 +1238,103 @@ ObjectAdapterI::parsePublishedEndpoints() } void -ObjectAdapterI::updateLocatorRegistry(const IceInternal::LocatorInfoPtr& locatorInfo, - const Ice::ObjectPrx& proxy, - bool registerProcess) +ObjectAdapterI::updateLocatorRegistry(const IceInternal::LocatorInfoPtr& locatorInfo, const Ice::ObjectPrx& proxy) { - if(!registerProcess && _id.empty()) + if(_id.empty() || !locatorInfo) { return; // Nothing to update. } - // - // Call on the locator registry outside the synchronization to - // blocking other threads that need to lock this OA. - // - LocatorRegistryPrx locatorRegistry = locatorInfo ? locatorInfo->getLocatorRegistry() : LocatorRegistryPrx(); - string serverId; - if(registerProcess) - { - assert(_instance); - serverId = _instance->initializationData().properties->getProperty("Ice.ServerId"); - - if(!locatorRegistry) - { - Warning out(_instance->initializationData().logger); - out << "object adapter `" << getName() << "' cannot register the process without a locator registry"; - } - else if(serverId.empty()) - { - Warning out(_instance->initializationData().logger); - out << "object adapter `" << getName() << "' cannot register the process without a value for Ice.ServerId"; - } - } - + LocatorRegistryPrx locatorRegistry = locatorInfo->getLocatorRegistry(); if(!locatorRegistry) { return; } - if(!_id.empty()) + try { - try + if(_replicaGroupId.empty()) { - if(_replicaGroupId.empty()) - { - locatorRegistry->setAdapterDirectProxy(_id, proxy); - } - else - { - locatorRegistry->setReplicatedAdapterDirectProxy(_id, _replicaGroupId, proxy); - } + locatorRegistry->setAdapterDirectProxy(_id, proxy); } - catch(const AdapterNotFoundException&) - { - if(_instance->traceLevels()->location >= 1) - { - Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat); - out << "couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n"; - out << "the object adapter is not known to the locator registry"; - } - - NotRegisteredException ex(__FILE__, __LINE__); - ex.kindOfObject = "object adapter"; - ex.id = _id; - throw ex; - } - catch(const InvalidReplicaGroupIdException&) - { - if(_instance->traceLevels()->location >= 1) - { - Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat); - out << "couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n"; - out << "the replica group `" << _replicaGroupId << "' is not known to the locator registry"; - } - - NotRegisteredException ex(__FILE__, __LINE__); - ex.kindOfObject = "replica group"; - ex.id = _replicaGroupId; - throw ex; - } - catch(const AdapterAlreadyActiveException&) - { - if(_instance->traceLevels()->location >= 1) - { - Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat); - out << "couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n"; - out << "the object adapter endpoints are already set"; - } - - ObjectAdapterIdInUseException ex(__FILE__, __LINE__); - ex.id = _id; - throw ex; - } - catch(const LocalException& ex) + else { - if(_instance->traceLevels()->location >= 1) - { - Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat); - out << "couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n" << ex; - } - throw; // TODO: Shall we raise a special exception instead of a non obvious local exception? + locatorRegistry->setReplicatedAdapterDirectProxy(_id, _replicaGroupId, proxy); } - + } + catch(const AdapterNotFoundException&) + { if(_instance->traceLevels()->location >= 1) { Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat); - out << "updated object adapter `" + _id + "' endpoints with the locator registry\n"; - out << "endpoints = "; - if(proxy) - { - EndpointSeq endpts = proxy ? proxy->ice_getEndpoints() : EndpointSeq(); - ostringstream o; - transform(endpts.begin(), endpts.end(), ostream_iterator<string>(o, endpts.size() > 1 ? ":" : ""), - Ice::constMemFun(&Endpoint::toString)); - out << o.str(); - } + out << "couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n"; + out << "the object adapter is not known to the locator registry"; } - } - if(registerProcess && !serverId.empty()) + NotRegisteredException ex(__FILE__, __LINE__); + ex.kindOfObject = "object adapter"; + ex.id = _id; + throw ex; + } + catch(const InvalidReplicaGroupIdException&) { + if(_instance->traceLevels()->location >= 1) { - IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this); - - if(_processId.name == "") - { - ProcessPtr servant = new ProcessI(_communicator); - _processId = addWithUUID(servant)->ice_getIdentity(); - } + Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat); + out << "couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n"; + out << "the replica group `" << _replicaGroupId << "' is not known to the locator registry"; } - try + NotRegisteredException ex(__FILE__, __LINE__); + ex.kindOfObject = "replica group"; + ex.id = _replicaGroupId; + throw ex; + } + catch(const AdapterAlreadyActiveException&) + { + if(_instance->traceLevels()->location >= 1) { - locatorRegistry->setServerProcessProxy(serverId, ProcessPrx::uncheckedCast(createDirectProxy(_processId))); + Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat); + out << "couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n"; + out << "the object adapter endpoints are already set"; } - catch(const ServerNotFoundException&) - { - if(_instance->traceLevels()->location >= 1) - { - Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat); - out << "couldn't register server `" + serverId + "' with the locator registry:\n"; - out << "the server is not known to the locator registry"; - } - NotRegisteredException ex(__FILE__, __LINE__); - ex.kindOfObject = "server"; - ex.id = serverId; - throw ex; - } - catch(const Ice::LocalException& ex) + ObjectAdapterIdInUseException ex(__FILE__, __LINE__); + ex.id = _id; + throw ex; + } + catch(const ObjectAdapterDeactivatedException&) + { + // Expected if collocated call and OA is deactivated, ignore. + } + catch(const CommunicatorDestroyedException&) + { + // Ignore. + } + catch(const LocalException& ex) + { + if(_instance->traceLevels()->location >= 1) { - if(_instance->traceLevels()->location >= 1) - { - Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat); - out << "couldn't register server `" + serverId + "' with the locator registry:\n" << ex; - } - throw; // TODO: Shall we raise a special exception instead of a non obvious local exception? + Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat); + out << "couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n" << ex; } + throw; // TODO: Shall we raise a special exception instead of a non obvious local exception? + } - if(_instance->traceLevels()->location >= 1) + if(_instance->traceLevels()->location >= 1) + { + Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat); + out << "updated object adapter `" + _id + "' endpoints with the locator registry\n"; + out << "endpoints = "; + if(proxy) { - Trace out(_instance->initializationData().logger, _instance->traceLevels()->locationCat); - out << "registered server `" + serverId + "' with the locator registry"; + EndpointSeq endpts = proxy ? proxy->ice_getEndpoints() : EndpointSeq(); + ostringstream o; + transform(endpts.begin(), endpts.end(), ostream_iterator<string>(o, endpts.size() > 1 ? ":" : ""), + Ice::constMemFun(&Endpoint::toString)); + out << o.str(); } - } + } } bool @@ -1431,7 +1357,6 @@ Ice::ObjectAdapterI::filterProperties(StringSeq& unknownProps) "Locator.Router", "MessageSizeMax", "PublishedEndpoints", - "RegisterProcess", "ReplicaGroupId", "Router", "Router.EncodingVersion", diff --git a/cpp/src/Ice/ObjectAdapterI.h b/cpp/src/Ice/ObjectAdapterI.h index 6ae147d9907..03e389ec0a1 100644 --- a/cpp/src/Ice/ObjectAdapterI.h +++ b/cpp/src/Ice/ObjectAdapterI.h @@ -114,7 +114,7 @@ private: void checkForDeactivation() const; std::vector<IceInternal::EndpointIPtr> parseEndpoints(const std::string&, bool) const; std::vector<IceInternal::EndpointIPtr> parsePublishedEndpoints(); - void updateLocatorRegistry(const IceInternal::LocatorInfoPtr&, const Ice::ObjectPrx&, bool); + void updateLocatorRegistry(const IceInternal::LocatorInfoPtr&, const Ice::ObjectPrx&); bool filterProperties(Ice::StringSeq&); enum State @@ -146,7 +146,6 @@ private: IceInternal::LocatorInfoPtr _locatorInfo; int _directCount; // The number of direct proxies dispatching on this object adapter. bool _noConfig; - Identity _processId; size_t _messageSizeMax; }; diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp index 1a310622564..c461535c33e 100644 --- a/cpp/src/Ice/Reference.cpp +++ b/cpp/src/Ice/Reference.cpp @@ -1669,7 +1669,7 @@ IceInternal::RoutableReference::getConnectionNoRouterInfo(const GetConnectionCal if(_locatorInfo) { RoutableReference* self = const_cast<RoutableReference*>(this); - _locatorInfo->getEndpoints(self, _locatorCacheTimeout, LocatorInfo::GetEndpointsCallbackPtr(new Callback(self, callback))); + _locatorInfo->getEndpointsWithCallback(self, _locatorCacheTimeout, new Callback(self, callback)); } else { diff --git a/cpp/src/Ice/RegisterPlugins.cpp b/cpp/src/Ice/RegisterPluginsInit.cpp index 155628c627b..870084b80a3 100644 --- a/cpp/src/Ice/RegisterPlugins.cpp +++ b/cpp/src/Ice/RegisterPluginsInit.cpp @@ -7,7 +7,7 @@ // // ********************************************************************** -#include <Ice/RegisterPlugins.h> +#include <Ice/RegisterPluginsInit.h> #include <Ice/CommunicatorF.h> #include <Ice/Initialize.h> diff --git a/cpp/src/Ice/RegisterPlugins.h b/cpp/src/Ice/RegisterPluginsInit.h index 8e1005368f2..62898f6bfdb 100644 --- a/cpp/src/Ice/RegisterPlugins.h +++ b/cpp/src/Ice/RegisterPluginsInit.h @@ -7,8 +7,8 @@ // // ********************************************************************** -#ifndef ICE_REGISTER_PLUGINS_H -#define ICE_REGISTER_PLUGINS_H +#ifndef ICE_REGISTER_PLUGINS_INIT_H +#define ICE_REGISTER_PLUGINS_INIT_H namespace IceInternal { diff --git a/cpp/src/Ice/Selector.cpp b/cpp/src/Ice/Selector.cpp index 39f411fb115..af4a5b07c52 100644 --- a/cpp/src/Ice/Selector.cpp +++ b/cpp/src/Ice/Selector.cpp @@ -40,11 +40,16 @@ Selector::destroy() void Selector::initialize(IceInternal::EventHandler* handler) { + EventHandlerPtr h = handler; handler->__incRef(); handler->getNativeInfo()->setCompletedHandler( - ref new SocketOperationCompletedHandler([=](int operation) + ref new SocketOperationCompletedHandler([=](int operation) { - completed(handler, static_cast<SocketOperation>(operation)); + // + // Use the reference counted handler to ensure it's not + // destroyed as long as the callback lambda exists. + // + completed(h, static_cast<SocketOperation>(operation)); })); } @@ -56,12 +61,12 @@ Selector::update(IceInternal::EventHandler* handler, SocketOperation remove, Soc if(add & SocketOperationRead && !(handler->_pending & SocketOperationRead)) { handler->_pending = static_cast<SocketOperation>(handler->_pending | SocketOperationRead); - completed(handler, SocketOperationRead); // Start an asynchrnous read + completed(handler, SocketOperationRead); // Start an asynchrnous read } else if(add & SocketOperationWrite && !(handler->_pending & SocketOperationWrite)) { handler->_pending = static_cast<SocketOperation>(handler->_pending | SocketOperationWrite); - completed(handler, SocketOperationWrite); // Start an asynchrnous write + completed(handler, SocketOperationWrite); // Start an asynchrnous write } } @@ -69,10 +74,11 @@ void Selector::finish(IceInternal::EventHandler* handler) { handler->_registered = SocketOperationNone; + handler->_finish = false; // Ensures that finished() is only called once on the event handler. handler->__decRef(); } -IceInternal::EventHandler* +IceInternal::EventHandlerPtr Selector::getNextHandler(SocketOperation& status, int timeout) { Lock lock(*this); @@ -83,7 +89,7 @@ Selector::getNextHandler(SocketOperation& status, int timeout) timedWait(IceUtil::Time::seconds(timeout)); if(_events.empty()) { - throw SelectorTimeoutException(); + throw SelectorTimeoutException(); } } else @@ -92,15 +98,15 @@ Selector::getNextHandler(SocketOperation& status, int timeout) } } assert(!_events.empty()); - IceInternal::EventHandler* handler = _events.front().handler; + IceInternal::EventHandlerPtr handler = _events.front().handler; const SelectEvent& event = _events.front(); status = event.status; _events.pop_front(); return handler; } -void -Selector::completed(IceInternal::EventHandler* handler, SocketOperation op) +void +Selector::completed(const IceInternal::EventHandlerPtr& handler, SocketOperation op) { Lock lock(*this); _events.push_back(SelectEvent(handler, op)); @@ -316,7 +322,7 @@ Selector::update(EventHandler* handler, SocketOperation remove, SocketOperation if(remove & SocketOperationRead) { struct kevent ev; - EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, handler); + EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, handler); _changes.push_back(ev); } if(remove & SocketOperationWrite) @@ -328,14 +334,14 @@ Selector::update(EventHandler* handler, SocketOperation remove, SocketOperation if(add & SocketOperationRead) { struct kevent ev; - EV_SET(&ev, fd, EVFILT_READ, EV_ADD | (handler->_disabled & SocketOperationRead ? EV_DISABLE : 0), 0, 0, + EV_SET(&ev, fd, EVFILT_READ, EV_ADD | (handler->_disabled & SocketOperationRead ? EV_DISABLE : 0), 0, 0, handler); _changes.push_back(ev); } if(add & SocketOperationWrite) { struct kevent ev; - EV_SET(&ev, fd, EVFILT_WRITE, EV_ADD | (handler->_disabled & SocketOperationWrite ? EV_DISABLE : 0), 0, 0, + EV_SET(&ev, fd, EVFILT_WRITE, EV_ADD | (handler->_disabled & SocketOperationWrite ? EV_DISABLE : 0), 0, 0, handler); _changes.push_back(ev); } @@ -391,7 +397,7 @@ Selector::disable(EventHandler* handler, SocketOperation status) return; } handler->_disabled = static_cast<SocketOperation>(handler->_disabled | status); - + if(handler->_registered & status) { SOCKET fd = handler->getNativeInfo()->fd(); @@ -431,7 +437,7 @@ Selector::finish(EventHandler* handler, bool closeNow) { // // Update selector now to remove the FD from the kqueue if - // we're going to close it now. This isn't necessary for + // we're going to close it now. This isn't necessary for // epoll since we always update the epoll FD immediately. // updateSelector(); @@ -441,7 +447,7 @@ Selector::finish(EventHandler* handler, bool closeNow) } #if defined(ICE_USE_KQUEUE) -void +void Selector::updateSelector() { int rs = kevent(_queueFd, &_changes[0], _changes.size(), 0, 0, 0); @@ -454,7 +460,7 @@ Selector::updateSelector() } #endif -void +void Selector::select(vector<pair<EventHandler*, SocketOperation> >& handlers, int timeout) { int ret = 0; @@ -505,9 +511,9 @@ Selector::select(vector<pair<EventHandler*, SocketOperation> >& handlers, int ti #if defined(ICE_USE_EPOLL) struct epoll_event& ev = _events[i]; p.first = reinterpret_cast<EventHandler*>(ev.data.ptr); - p.second = static_cast<SocketOperation>(((ev.events & (EPOLLIN | EPOLLERR)) ? - SocketOperationRead : SocketOperationNone) | - ((ev.events & (EPOLLOUT | EPOLLERR)) ? + p.second = static_cast<SocketOperation>(((ev.events & (EPOLLIN | EPOLLERR)) ? + SocketOperationRead : SocketOperationNone) | + ((ev.events & (EPOLLOUT | EPOLLERR)) ? SocketOperationWrite : SocketOperationNone)); #else struct kevent& ev = _events[i]; @@ -546,7 +552,7 @@ void eventHandlerSocketCallback(CFSocketRef, CFSocketCallBackType callbackType, } else if(callbackType == kCFSocketConnectCallBack) { - reinterpret_cast<EventHandlerWrapper*>(info)->readyCallback(SocketOperationConnect, + reinterpret_cast<EventHandlerWrapper*>(info)->readyCallback(SocketOperationConnect, d ? *reinterpret_cast<const SInt32*>(d) : 0); } } @@ -558,7 +564,7 @@ public: SelectorHelperThread(Selector& selector) : _selector(selector) { } - + virtual void run() { _selector.run(); @@ -590,8 +596,8 @@ toCFCallbacks(SocketOperation op) } -EventHandlerWrapper::EventHandlerWrapper(const EventHandlerPtr& handler, Selector& selector) : - _handler(handler), +EventHandlerWrapper::EventHandlerWrapper(const EventHandlerPtr& handler, Selector& selector) : + _handler(handler), _nativeInfo(StreamNativeInfoPtr::dynamicCast(handler->getNativeInfo())), _selector(selector), _ready(SocketOperationNone), @@ -601,14 +607,14 @@ EventHandlerWrapper::EventHandlerWrapper(const EventHandlerPtr& handler, Selecto { SOCKET fd = handler->getNativeInfo()->fd(); CFSocketContext ctx = { 0, this, 0, 0, 0 }; - _socket = CFSocketCreateWithNative(kCFAllocatorDefault, + _socket = CFSocketCreateWithNative(kCFAllocatorDefault, fd, - kCFSocketReadCallBack | - kCFSocketWriteCallBack | + kCFSocketReadCallBack | + kCFSocketWriteCallBack | kCFSocketConnectCallBack, - eventHandlerSocketCallback, + eventHandlerSocketCallback, &ctx); - + // Disable automatic re-enabling of callbacks and closing of the native socket. CFSocketSetSocketFlags(_socket, 0); CFSocketDisableCallBacks(_socket, kCFSocketReadCallBack | kCFSocketWriteCallBack | kCFSocketConnectCallBack); @@ -666,7 +672,7 @@ EventHandlerWrapper::updateRunLoop() { _nativeInfo->unregisterFromRunLoop(SocketOperationWrite, false); } - + if(!(op & (SocketOperationRead | SocketOperationConnect)) || _ready & SocketOperationRead) { _nativeInfo->unregisterFromRunLoop(SocketOperationRead, false); @@ -698,7 +704,7 @@ EventHandlerWrapper::ready(SocketOperation op, int error) // // Unregister the stream from the runloop as soon as we got the callback. This is // required to allow thread pool thread to perform read/write operations on the - // stream (which can't be used from another thread than the run loop thread if + // stream (which can't be used from another thread than the run loop thread if // it's registered with a run loop). // op = _nativeInfo->unregisterFromRunLoop(op, error != 0); @@ -731,7 +737,7 @@ EventHandlerWrapper::checkReady() if(_ready & _handler->_registered) { _selector.addReadyHandler(this); - } + } } SocketOperation @@ -748,7 +754,7 @@ EventHandlerWrapper::update(SocketOperation remove, SocketOperation add) { SocketOperation previous = _handler->_registered; _handler->_registered = static_cast<SocketOperation>(_handler->_registered & ~remove); - _handler->_registered = static_cast<SocketOperation>(_handler->_registered | add); + _handler->_registered = static_cast<SocketOperation>(_handler->_registered | add); if(previous == _handler->_registered) { return false; @@ -804,7 +810,7 @@ Selector::destroy() { CFRunLoopSourceSignal(_source); CFRunLoopWakeUp(_runLoop); - + wait(); } @@ -825,7 +831,7 @@ Selector::initialize(EventHandler* handler) _wrappers[handler] = new EventHandlerWrapper(handler, *this); } -void +void Selector::update(EventHandler* handler, SocketOperation remove, SocketOperation add) { Lock sync(*this); @@ -838,7 +844,7 @@ Selector::update(EventHandler* handler, SocketOperation remove, SocketOperation } } -void +void Selector::enable(EventHandler* handler, SocketOperation op) { Lock sync(*this); @@ -878,7 +884,7 @@ Selector::finish(EventHandler* handler, bool closeNow) notify(); return closeNow; } - + void Selector::select(std::vector<std::pair<EventHandler*, SocketOperation> >& handlers, int timeout) { @@ -902,7 +908,7 @@ Selector::select(std::vector<std::pair<EventHandler*, SocketOperation> >& handle // // Wait for handlers to be ready. - // + // handlers.clear(); while(_selectedHandlers.empty()) { @@ -910,7 +916,7 @@ Selector::select(std::vector<std::pair<EventHandler*, SocketOperation> >& handle { CFRunLoopSourceSignal(_source); CFRunLoopWakeUp(_runLoop); - + wait(); } @@ -966,7 +972,7 @@ Selector::processInterrupt() } } -void +void Selector::ready(EventHandlerWrapper* wrapper, SocketOperation op, int error) { Lock sync(*this); @@ -984,7 +990,7 @@ Selector::addReadyHandler(EventHandlerWrapper* wrapper) } } -void +void Selector::run() { { @@ -1087,7 +1093,7 @@ Selector::disable(EventHandler* handler, SocketOperation status) return; } handler->_disabled = static_cast<SocketOperation>(handler->_disabled | status); - + if(handler->_registered & status) { updateImpl(handler); @@ -1125,7 +1131,7 @@ Selector::startSelect() { continue; } - + Ice::SocketException ex(__FILE__, __LINE__); ex.error = IceInternal::getSocketErrno(); throw ex; @@ -1148,7 +1154,7 @@ Selector::finishSelect() _selecting = false; } -void +void Selector::select(vector<pair<EventHandler*, SocketOperation> >& handlers, int timeout) { int ret = 0; @@ -1230,7 +1236,7 @@ Selector::select(vector<pair<EventHandler*, SocketOperation> >& handlers, int ti } if(fd == _fdIntrRead) // Interrupted, we have to process the interrupt before returning any handlers - { + { handlers.clear(); return; } @@ -1292,7 +1298,7 @@ Selector::updateImpl(EventHandler* handler) { continue; } - + Ice::SocketException ex(__FILE__, __LINE__); ex.error = IceInternal::getSocketErrno(); throw ex; diff --git a/cpp/src/Ice/Selector.h b/cpp/src/Ice/Selector.h index 7ca36dee887..e890db6e2bf 100644 --- a/cpp/src/Ice/Selector.h +++ b/cpp/src/Ice/Selector.h @@ -61,11 +61,11 @@ class SelectorTimeoutException struct SelectEvent { - SelectEvent(EventHandler* handler, SocketOperation status) : handler(handler), status(status) + SelectEvent(const EventHandlerPtr& handler, SocketOperation status) : handler(handler), status(status) { } - EventHandler* handler; + EventHandlerPtr handler; SocketOperation status; }; @@ -81,9 +81,9 @@ public: void update(EventHandler*, SocketOperation, SocketOperation); void finish(EventHandler*); - EventHandler* getNextHandler(SocketOperation&, int); + EventHandlerPtr getNextHandler(SocketOperation&, int); - void completed(EventHandler*, SocketOperation); + void completed(const EventHandlerPtr&, SocketOperation); private: diff --git a/cpp/src/Ice/StreamSocket.cpp b/cpp/src/Ice/StreamSocket.cpp index 7ade8172ba4..8eb3a23daf9 100644 --- a/cpp/src/Ice/StreamSocket.cpp +++ b/cpp/src/Ice/StreamSocket.cpp @@ -105,7 +105,7 @@ StreamSocket::connect(Buffer& readBuffer, Buffer& writeBuffer) bool StreamSocket::isConnected() { - return _state == StateConnected; + return _state == StateConnected && _fd != INVALID_SOCKET; } size_t @@ -377,7 +377,7 @@ StreamSocket::startWrite(Buffer& buf) void StreamSocket::finishWrite(Buffer& buf) { - if(_state < StateConnected && _state != StateProxyWrite) + if(_fd == INVALID_SOCKET || (_state < StateConnected && _state != StateProxyWrite)) { return; } @@ -439,6 +439,11 @@ StreamSocket::startRead(Buffer& buf) void StreamSocket::finishRead(Buffer& buf) { + if(_fd == INVALID_SOCKET) + { + return; + } + if(static_cast<int>(_read.count) == SOCKET_ERROR) { WSASetLastError(_read.error); diff --git a/cpp/src/Ice/StringConverterPlugin.cpp b/cpp/src/Ice/StringConverterPlugin.cpp index 2c81e800234..84775e5ad80 100644 --- a/cpp/src/Ice/StringConverterPlugin.cpp +++ b/cpp/src/Ice/StringConverterPlugin.cpp @@ -63,7 +63,7 @@ createStringConverter(const CommunicatorPtr& communicator, const string& name, c return 0; } } - + if(cp == -1) { Error out(communicator->getLogger()); @@ -100,7 +100,7 @@ createStringConverter(const CommunicatorPtr& communicator, const string& name, c return 0; } } - + switch(iconvArgs.size()) { case 0: @@ -125,7 +125,7 @@ createStringConverter(const CommunicatorPtr& communicator, const string& name, c } } -#endif +#endif return new StringConverterPlugin(communicator, stringConverter, wstringConverter); } @@ -142,4 +142,16 @@ createStringConverter(const CommunicatorPtr& communicator, const string& name, c return 0; } } + +} + +namespace Ice +{ + +ICE_API void +registerIceStringConverter(bool loadOnInitialize) +{ + Ice::registerPluginFactory("IceStringConverter", createStringConverter, loadOnInitialize); +} + } diff --git a/cpp/src/Ice/ThreadPool.cpp b/cpp/src/Ice/ThreadPool.cpp index f7c25cc20f4..7ff3f57db4b 100644 --- a/cpp/src/Ice/ThreadPool.cpp +++ b/cpp/src/Ice/ThreadPool.cpp @@ -597,7 +597,7 @@ IceInternal::ThreadPool::finish(const EventHandlerPtr& handler, bool closeNow) return closeNow; #else // If there are no pending asynchronous operations, we can call finish on the handler now. - if(!handler->_pending) + if(!(handler->_pending & SocketOperationWaitForClose)) { _workQueue->queue(new FinishedWorkItem(handler, false)); _selector.finish(handler.get()); @@ -1103,7 +1103,7 @@ IceInternal::ThreadPool::startMessage(ThreadPoolCurrent& current) if(!current._handler->finishAsync(current.operation)) // Returns false if the handler is finished. { current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation); - if(!current._handler->_pending && current._handler->_finish) + if(!(current._handler->_pending & SocketOperationWaitForClose) && current._handler->_finish) { _workQueue->queue(new FinishedWorkItem(current._handler, false)); _selector.finish(current._handler.get()); @@ -1117,7 +1117,7 @@ IceInternal::ThreadPool::startMessage(ThreadPoolCurrent& current) if(!current._handler->startAsync(current.operation)) { current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation); - if(!current._handler->_pending && current._handler->_finish) + if(!(current._handler->_pending & SocketOperationWaitForClose) && current._handler->_finish) { _workQueue->queue(new FinishedWorkItem(current._handler, false)); _selector.finish(current._handler.get()); @@ -1140,7 +1140,7 @@ IceInternal::ThreadPool::startMessage(ThreadPoolCurrent& current) else { current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation); - if(!current._handler->_pending && current._handler->_finish) + if(!(current._handler->_pending & SocketOperationWaitForClose) && current._handler->_finish) { _workQueue->queue(new FinishedWorkItem(current._handler, false)); _selector.finish(current._handler.get()); @@ -1170,7 +1170,7 @@ IceInternal::ThreadPool::finishMessage(ThreadPoolCurrent& current) current._handler->_pending = static_cast<SocketOperation>(current._handler->_pending & ~current.operation); } - if(!current._handler->_pending && current._handler->_finish) + if(!(current._handler->_pending & SocketOperationWaitForClose) && current._handler->_finish) { // There are no more pending async operations, it's time to call finish. _workQueue->queue(new FinishedWorkItem(current._handler, false)); diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp index b0392ad9cfd..c664eeb977e 100644 --- a/cpp/src/Ice/UdpTransceiver.cpp +++ b/cpp/src/Ice/UdpTransceiver.cpp @@ -124,6 +124,7 @@ IceInternal::UdpTransceiver::close() _readPending = false; } _received.clear(); + _completedHandler = nullptr; #endif assert(_fd != INVALID_SOCKET); @@ -389,6 +390,7 @@ IceInternal::UdpTransceiver::startWrite(Buffer& buf) auto operation = safe_cast<DatagramSocket^>(_fd)->ConnectAsync(_addr.host, _addr.port); if(!checkIfErrorOrCompleted(SocketOperationConnect, operation)) { + SocketOperationCompletedHandler^ completed = _completedHandler; operation->Completed = ref new AsyncActionCompletedHandler( [=] (IAsyncAction^ info, Windows::Foundation::AsyncStatus status) { @@ -402,7 +404,7 @@ IceInternal::UdpTransceiver::startWrite(Buffer& buf) _write.count = 0; _writer = ref new DataWriter(safe_cast<DatagramSocket^>(_fd)->OutputStream); } - _completedHandler(SocketOperationConnect); + completed(SocketOperationConnect); }); } else @@ -416,6 +418,7 @@ IceInternal::UdpTransceiver::startWrite(Buffer& buf) auto operation = safe_cast<DatagramSocket^>(_fd)->GetOutputStreamAsync(_addr.host, _addr.port); if(!checkIfErrorOrCompleted(SocketOperationConnect, operation)) { + SocketOperationCompletedHandler^ completed = _completedHandler; operation->Completed = ref new AsyncOperationCompletedHandler<IOutputStream^>( [=] (IAsyncOperation<IOutputStream^>^ info, Windows::Foundation::AsyncStatus status) { @@ -433,7 +436,7 @@ IceInternal::UdpTransceiver::startWrite(Buffer& buf) { setMcastGroup(_fd, _mcastAddr, ""); } - _completedHandler(SocketOperationConnect); + completed(SocketOperationConnect); }); } else @@ -457,6 +460,7 @@ IceInternal::UdpTransceiver::startWrite(Buffer& buf) { try { + SocketOperationCompletedHandler^ completed = _completedHandler; DatagramSocket^ fd = safe_cast<DatagramSocket^>(_fd); concurrency::create_task(fd->GetOutputStreamAsync(_peerAddr.host, _peerAddr.port)).then( [=,&buf](concurrency::task<IOutputStream^> task) @@ -478,7 +482,7 @@ IceInternal::UdpTransceiver::startWrite(Buffer& buf) // completed callback. // _write.count = operation->GetResults(); - _completedHandler(SocketOperationWrite); + completed(SocketOperationWrite); } else if(status == Windows::Foundation::AsyncStatus::Started) { @@ -500,7 +504,7 @@ IceInternal::UdpTransceiver::startWrite(Buffer& buf) { _write.count = SOCKET_ERROR; _write.error = pex->HResult; - _completedHandler(SocketOperationWrite); + completed(SocketOperationWrite); } }); } @@ -952,10 +956,19 @@ IceInternal::UdpTransceiver::UdpTransceiver(const ProtocolInstancePtr& instance, } #else DatagramSocket^ socket = safe_cast<DatagramSocket^>(_fd); + IceUtil::Handle<UdpTransceiver> self(this); +# if _WIN32_WINNT >= 0x0A00 + // On Windows 10, it's necessary to set this property to allow Win32 applications to + // bind to the same multicast address + if(isMulticast(_addr)) + { + socket->Control->MulticastOnly = true; + } +# endif socket->MessageReceived += ref new TypedEventHandler<DatagramSocket^, DatagramSocketMessageReceivedEventArgs^>( [=](DatagramSocket^ fd, DatagramSocketMessageReceivedEventArgs^ args) { - this->appendMessage(args); + self->appendMessage(args); }); #endif @@ -999,10 +1012,19 @@ IceInternal::UdpTransceiver::UdpTransceiver(const UdpEndpointIPtr& endpoint, con _mcastAddr.saStorage.ss_family = AF_UNSPEC; #else DatagramSocket^ socket = safe_cast<DatagramSocket^>(_fd); +# if _WIN32_WINNT >= 0x0A00 + // On Windows 10, it's necessary to set this property to allow Win32 applications to + // bind to the same multicast address + if(isMulticast(_addr)) + { + socket->Control->MulticastOnly = true; + } +# endif + IceUtil::Handle<UdpTransceiver> self(this); socket->MessageReceived += ref new TypedEventHandler<DatagramSocket^, DatagramSocketMessageReceivedEventArgs^>( [=](DatagramSocket^ fd, DatagramSocketMessageReceivedEventArgs^ args) { - this->appendMessage(args); + self->appendMessage(args); }); #endif } diff --git a/cpp/src/Ice/WSTransceiver.cpp b/cpp/src/Ice/WSTransceiver.cpp index ccb3c6c7ff3..e68bccc4668 100644 --- a/cpp/src/Ice/WSTransceiver.cpp +++ b/cpp/src/Ice/WSTransceiver.cpp @@ -478,6 +478,18 @@ IceInternal::WSTransceiver::close() { _delegate->close(); _state = StateClosed; + + // + // Clear the buffers now instead of waiting for destruction. + // + if(!_writePending) + { + _writeBuffer.b.clear(); + } + if(!_readPending) + { + _readBuffer.b.clear(); + } } SocketOperation @@ -671,6 +683,7 @@ void IceInternal::WSTransceiver::finishWrite(Buffer& buf) { _writePending = false; + if(_state < StateOpened) { if(_state < StateConnected) @@ -694,6 +707,12 @@ IceInternal::WSTransceiver::finishWrite(Buffer& buf) _delegate->finishWrite(buf); } + if(_state == StateClosed) + { + _writeBuffer.b.clear(); + return; + } + postWrite(buf); } @@ -776,6 +795,13 @@ IceInternal::WSTransceiver::finishRead(Buffer& buf, bool& hasMoreData) { _delegate->finishRead(_readBuffer, hasMoreData); } + + if(_state == StateClosed) + { + _readBuffer.b.clear(); + return; + } + postRead(buf); } #endif diff --git a/cpp/src/Ice/winrt/.depend.mak b/cpp/src/Ice/winrt/.depend.mak index 0fb809c9414..6ee2f1ea6b7 100755 --- a/cpp/src/Ice/winrt/.depend.mak +++ b/cpp/src/Ice/winrt/.depend.mak @@ -1969,6 +1969,7 @@ $(ARCH)\$(CONFIG)\DefaultsAndOverrides.obj: \ $(ARCH)\$(CONFIG)\DeprecatedStringConverter.obj: \ ..\DeprecatedStringConverter.cpp \ + "$(includedir)\IceUtil\DisableWarnings.h" \ "$(includedir)\Ice\DeprecatedStringConverter.h" \ "$(includedir)\Ice\Config.h" \ "$(includedir)\IceUtil\Config.h" \ @@ -3554,7 +3555,7 @@ $(ARCH)\$(CONFIG)\Instance.obj: \ "$(includedir)\Ice\MetricsAdminI.h" \ "$(includedir)\Ice\MetricsFunctional.h" \ "..\..\..\src\Ice\LoggerAdminI.h" \ - "..\..\..\src\Ice\RegisterPlugins.h" \ + "..\..\..\src\Ice\RegisterPluginsInit.h" \ "$(includedir)\IceUtil\UUID.h" \ $(ARCH)\$(CONFIG)\IPEndpointI.obj: \ @@ -10204,6 +10205,7 @@ $(ARCH)\$(CONFIG)\IceDiscovery\PluginI.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "..\..\..\src\IceDiscovery\PluginI.h" \ "..\..\..\src\IceDiscovery\LookupI.h" \ "IceDiscovery\IceDiscovery.h" \ @@ -10333,11 +10335,12 @@ $(ARCH)\$(CONFIG)\IceLocatorDiscovery\PluginI.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "..\..\..\src\IceLocatorDiscovery\PluginI.h" \ "IceLocatorDiscovery\IceLocatorDiscovery.h" \ -$(ARCH)\$(CONFIG)\RegisterPlugins.obj: \ - RegisterPlugins.cpp \ +$(ARCH)\$(CONFIG)\RegisterPluginsInit.obj: \ + RegisterPluginsInit.cpp \ "$(includedir)\Ice\Initialize.h" \ "$(includedir)\IceUtil\Timer.h" \ "$(includedir)\IceUtil\Shared.h" \ @@ -10408,7 +10411,7 @@ $(ARCH)\$(CONFIG)\RegisterPlugins.obj: \ "$(includedir)\Ice\BuiltinSequences.h" \ "$(includedir)\Ice\Plugin.h" \ "$(includedir)\Ice\BatchRequestInterceptor.h" \ - "..\..\..\src\Ice\RegisterPlugins.h" \ + "..\..\..\src\Ice\RegisterPluginsInit.h" \ $(ARCH)\$(CONFIG)\StreamAcceptor.obj: \ StreamAcceptor.cpp \ diff --git a/cpp/src/Ice/winrt/Makefile.mak b/cpp/src/Ice/winrt/Makefile.mak index 2add295a880..ede42429f6e 100644 --- a/cpp/src/Ice/winrt/Makefile.mak +++ b/cpp/src/Ice/winrt/Makefile.mak @@ -128,7 +128,7 @@ OBJS = $(ARCH)\$(CONFIG)\Acceptor.obj \ $(ARCH)\$(CONFIG)\IceDiscovery\PluginI.obj \ $(ARCH)\$(CONFIG)\IceLocatorDiscovery\PluginI.obj -LOCAL_OBJS = $(ARCH)\$(CONFIG)\RegisterPlugins.obj \ +LOCAL_OBJS = $(ARCH)\$(CONFIG)\RegisterPluginsInit.obj \ $(ARCH)\$(CONFIG)\StreamAcceptor.obj \ $(ARCH)\$(CONFIG)\StreamConnector.obj \ $(ARCH)\$(CONFIG)\StreamEndpointI.obj \ diff --git a/cpp/src/Ice/winrt/RegisterPlugins.cpp b/cpp/src/Ice/winrt/RegisterPluginsInit.cpp index 12289f028c8..28fcc8b4f2b 100644 --- a/cpp/src/Ice/winrt/RegisterPlugins.cpp +++ b/cpp/src/Ice/winrt/RegisterPluginsInit.cpp @@ -8,7 +8,7 @@ // ********************************************************************** #include <Ice/Initialize.h> -#include <Ice/RegisterPlugins.h> +#include <Ice/RegisterPluginsInit.h> using namespace std; using namespace Ice; @@ -26,6 +26,17 @@ Plugin* createIceLocatorDiscovery(const CommunicatorPtr&, const string&, const S } +namespace Ice +{ + +void +registerIceSSL(bool) +{ + // Nothing to do, IceSSL is always registered by the static initializer. +} + +} + RegisterPluginsInit::RegisterPluginsInit() { registerPluginFactory("IceUDP", createIceUDP, true); diff --git a/cpp/src/Ice/winrt/StreamTransceiver.cpp b/cpp/src/Ice/winrt/StreamTransceiver.cpp index 54a29035feb..e0a7acf6b9a 100644 --- a/cpp/src/Ice/winrt/StreamTransceiver.cpp +++ b/cpp/src/Ice/winrt/StreamTransceiver.cpp @@ -99,6 +99,11 @@ void IceInternal::StreamTransceiver::close() { assert(_fd != INVALID_SOCKET); + + _completedHandler = nullptr; + _readOperationCompletedHandler = nullptr; + _writeOperationCompletedHandler = nullptr; + try { closeSocket(_fd); @@ -146,6 +151,7 @@ IceInternal::StreamTransceiver::startWrite(Buffer& buf) if(!checkIfErrorOrCompleted(SocketOperationConnect, action)) { + SocketOperationCompletedHandler^ completed = _completedHandler; action->Completed = ref new AsyncActionCompletedHandler( [=] (IAsyncAction^ info, Windows::Foundation::AsyncStatus status) { @@ -157,9 +163,8 @@ IceInternal::StreamTransceiver::startWrite(Buffer& buf) else { _write.count = 0; - _verified = true; } - _completedHandler(SocketOperationConnect); + completed(SocketOperationConnect); }); } } @@ -204,6 +209,11 @@ IceInternal::StreamTransceiver::finishWrite(Buffer& buf) { if(_state < StateConnected) { + if(_write.count == SOCKET_ERROR) + { + checkConnectErrorCode(__FILE__, __LINE__, _write.error, _connectAddr.host); + } + _verified = true; return; } diff --git a/cpp/src/IceBox/.depend.mak b/cpp/src/IceBox/.depend.mak index 09119269b67..2d4c6b79cb0 100755 --- a/cpp/src/IceBox/.depend.mak +++ b/cpp/src/IceBox/.depend.mak @@ -128,6 +128,7 @@ Service.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "ServiceManagerI.h" \ "$(includedir)\IceBox\IceBox.h" \ "$(includedir)\IceBox\Config.h" \ @@ -256,6 +257,7 @@ ServiceManagerI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Ice\DynamicLibrary.h" \ "$(includedir)\Ice\DynamicLibraryF.h" \ "..\..\src\Ice\Instance.h" \ @@ -399,6 +401,7 @@ Admin.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\Options.h" \ "$(includedir)\IceUtil\RecMutex.h" \ "$(includedir)\IceBox\IceBox.h" \ diff --git a/cpp/src/IceBox/IceBox.rc b/cpp/src/IceBox/IceBox.rc index fdae99c9324..5e4b1a8bc46 100644 --- a/cpp/src/IceBox/IceBox.rc +++ b/cpp/src/IceBox/IceBox.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "IceBox DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "IceBox C++ Library\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceBox/IceBoxAdmin.rc b/cpp/src/IceBox/IceBoxAdmin.rc index 3d8a981d33b..1506f19c013 100644 --- a/cpp/src/IceBox/IceBoxAdmin.rc +++ b/cpp/src/IceBox/IceBoxAdmin.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -19,12 +19,12 @@ BEGIN BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IceBox Admin\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "iceboxadmin\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "iceboxadmin.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceBox/IceBoxExe.rc b/cpp/src/IceBox/IceBoxExe.rc index c1659b2fb04..a7a946fcc5d 100644 --- a/cpp/src/IceBox/IceBoxExe.rc +++ b/cpp/src/IceBox/IceBoxExe.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "IceBox\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "IceBox C++ Server\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceDiscovery/.depend.mak b/cpp/src/IceDiscovery/.depend.mak index fa86169f100..c198faca95c 100755 --- a/cpp/src/IceDiscovery/.depend.mak +++ b/cpp/src/IceDiscovery/.depend.mak @@ -324,6 +324,7 @@ PluginI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "PluginI.h" \ "LookupI.h" \ "IceDiscovery.h" \ diff --git a/cpp/src/IceDiscovery/IceDiscovery.rc b/cpp/src/IceDiscovery/IceDiscovery.rc index 1960b58463d..1d3f9efeb4d 100755 --- a/cpp/src/IceDiscovery/IceDiscovery.rc +++ b/cpp/src/IceDiscovery/IceDiscovery.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Ice Discovery DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "IceDiscovery C++ Plug-in\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceDiscovery/PluginI.cpp b/cpp/src/IceDiscovery/PluginI.cpp index 6873cec56b6..e0e1a7f9849 100644 --- a/cpp/src/IceDiscovery/PluginI.cpp +++ b/cpp/src/IceDiscovery/PluginI.cpp @@ -39,6 +39,17 @@ createIceDiscovery(const Ice::CommunicatorPtr& communicator, const string&, cons } +namespace Ice +{ + +ICE_DISCOVERY_API void +registerIceDiscovery(bool loadOnInitialize) +{ + Ice::registerPluginFactory("IceDiscovery", createIceDiscovery, loadOnInitialize); +} + +} + PluginI::PluginI(const Ice::CommunicatorPtr& communicator) : _communicator(communicator) { } diff --git a/cpp/src/IceGrid/.depend.mak b/cpp/src/IceGrid/.depend.mak index 8eec9192265..752acc49a81 100755 --- a/cpp/src/IceGrid/.depend.mak +++ b/cpp/src/IceGrid/.depend.mak @@ -149,6 +149,7 @@ Client.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Parser.h" \ "$(includedir)\IceGrid\Admin.h" \ "$(includedir)\Glacier2\Session.h" \ @@ -388,6 +389,7 @@ DescriptorHelper.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "DescriptorHelper.h" \ "$(includedir)\IceUtil\OutputUtil.h" \ "..\..\src\IceXML\Parser.h" \ @@ -526,6 +528,7 @@ DescriptorParser.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "..\..\src\IceXML\Parser.h" \ "..\..\src\IcePatch2Lib\Util.h" \ "$(includedir)\IcePatch2\FileInfo.h" \ @@ -764,6 +767,7 @@ Parser.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "..\..\src\IceXML\Parser.h" \ "Parser.h" \ "$(includedir)\IceGrid\Admin.h" \ @@ -907,6 +911,7 @@ Util.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Util.h" \ "$(includedir)\IceGrid\Descriptor.h" \ "$(includedir)\IceGrid\Config.h" \ @@ -1225,6 +1230,7 @@ Grammar.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Parser.h" \ "$(includedir)\IceGrid\Admin.h" \ "$(includedir)\Glacier2\Session.h" \ @@ -1356,6 +1362,7 @@ Scanner.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Parser.h" \ "$(includedir)\IceGrid\Admin.h" \ "$(includedir)\Glacier2\Session.h" \ @@ -1488,6 +1495,7 @@ AdminRouter.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ FileCache.obj: \ FileCache.cpp \ @@ -1804,6 +1812,7 @@ SessionManager.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "SessionManager.h" \ "$(includedir)\IceGrid\Query.h" \ "$(includedir)\IceGrid\Exception.h" \ @@ -2022,6 +2031,7 @@ Activator.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Activator.h" \ "Internal.h" \ "$(includedir)\Glacier2\Session.h" \ @@ -2184,6 +2194,7 @@ NodeAdminRouter.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "ServerI.h" \ "$(includedir)\Freeze\EvictorF.h" \ "Activator.h" \ @@ -2310,6 +2321,7 @@ NodeI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "..\..\src\IcePatch2Lib\Util.h" \ "$(includedir)\IcePatch2\FileInfo.h" \ "$(includedir)\IcePatch2\Config.h" \ @@ -2462,6 +2474,7 @@ NodeSessionManager.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "NodeSessionManager.h" \ "SessionManager.h" \ "$(includedir)\IceGrid\Query.h" \ @@ -2605,6 +2618,7 @@ ServerAdapterI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "ServerAdapterI.h" \ "Internal.h" \ "$(includedir)\Glacier2\Session.h" \ @@ -2751,6 +2765,7 @@ ServerI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "ServerI.h" \ "$(includedir)\Freeze\EvictorF.h" \ "Activator.h" \ @@ -2929,6 +2944,7 @@ AdapterCache.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\IceUtil.h" \ "$(includedir)\IceUtil\AbstractMutex.h" \ "$(includedir)\IceUtil\Cache.h" \ @@ -3057,6 +3073,7 @@ AdminCallbackRouter.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\IceUtil.h" \ "$(includedir)\IceUtil\AbstractMutex.h" \ "$(includedir)\IceUtil\Cache.h" \ @@ -3186,6 +3203,7 @@ AdminI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "..\..\src\Ice\TraceUtil.h" \ "..\..\src\Ice\TraceLevelsF.h" \ "AdminI.h" \ @@ -3385,6 +3403,7 @@ AdminSessionI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\UUID.h" \ "RegistryI.h" \ "$(includedir)\IceGrid\Registry.h" \ @@ -3592,6 +3611,7 @@ Allocatable.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\IceUtil.h" \ "$(includedir)\IceUtil\AbstractMutex.h" \ "$(includedir)\IceUtil\Cache.h" \ @@ -3739,6 +3759,7 @@ AllocatableObjectCache.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\IceUtil.h" \ "$(includedir)\IceUtil\AbstractMutex.h" \ "$(includedir)\IceUtil\Cache.h" \ @@ -3872,6 +3893,7 @@ Database.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\EvictorF.h" \ "$(includedir)\Freeze\ConnectionF.h" \ "$(includedir)\Freeze\Index.h" \ @@ -4129,6 +4151,7 @@ IdentityObjectInfoDict.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -4262,6 +4285,7 @@ InternalRegistryI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "RegistryI.h" \ "$(includedir)\IceGrid\Registry.h" \ "$(includedir)\IceGrid\Exception.h" \ @@ -4455,6 +4479,7 @@ LocatorI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "LocatorI.h" \ "Internal.h" \ "$(includedir)\Glacier2\Session.h" \ @@ -4640,6 +4665,7 @@ LocatorRegistryI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "LocatorRegistryI.h" \ "Internal.h" \ "$(includedir)\Glacier2\Session.h" \ @@ -4837,6 +4863,7 @@ NodeCache.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\IceUtil.h" \ "$(includedir)\IceUtil\AbstractMutex.h" \ "$(includedir)\IceUtil\Cache.h" \ @@ -4976,6 +5003,7 @@ NodeSessionI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "NodeSessionI.h" \ "Internal.h" \ "$(includedir)\Glacier2\Session.h" \ @@ -5174,6 +5202,7 @@ ObjectCache.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\IceUtil.h" \ "$(includedir)\IceUtil\AbstractMutex.h" \ "$(includedir)\IceUtil\Cache.h" \ @@ -5320,6 +5349,7 @@ PluginFacadeI.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\EvictorF.h" \ "$(includedir)\Freeze\ConnectionF.h" \ "$(includedir)\Freeze\Index.h" \ @@ -5492,6 +5522,7 @@ QueryI.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\EvictorF.h" \ "$(includedir)\Freeze\ConnectionF.h" \ "$(includedir)\Freeze\Index.h" \ @@ -5649,6 +5680,7 @@ ReapThread.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "ReapThread.h" \ RegistryAdminRouter.obj: \ @@ -5775,6 +5807,7 @@ RegistryAdminRouter.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\EvictorF.h" \ "$(includedir)\Freeze\ConnectionF.h" \ "$(includedir)\Freeze\Index.h" \ @@ -5947,6 +5980,7 @@ RegistryI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "..\..\src\Ice\Network.h" \ "..\..\src\Ice\NetworkF.h" \ "..\..\src\Ice\NetworkProxyF.h" \ @@ -6279,6 +6313,7 @@ ReplicaSessionI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "ReplicaSessionI.h" \ "$(includedir)\IceGrid\Registry.h" \ "$(includedir)\IceGrid\Exception.h" \ @@ -6455,6 +6490,7 @@ ReplicaSessionManager.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "ReplicaSessionManager.h" \ "SessionManager.h" \ "$(includedir)\IceGrid\Query.h" \ @@ -6634,6 +6670,7 @@ SerialsDict.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -6788,6 +6825,7 @@ ServerCache.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\IceUtil.h" \ "$(includedir)\IceUtil\AbstractMutex.h" \ "$(includedir)\IceUtil\Cache.h" \ @@ -6918,6 +6956,7 @@ SessionI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\UUID.h" \ "SessionI.h" \ "ReapThread.h" \ @@ -7109,6 +7148,7 @@ SessionServantManager.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\IceUtil.h" \ "$(includedir)\IceUtil\AbstractMutex.h" \ "$(includedir)\IceUtil\Cache.h" \ @@ -7242,6 +7282,7 @@ StringAdapterInfoDict.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -7377,6 +7418,7 @@ StringApplicationInfoDict.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -7509,6 +7551,7 @@ Topics.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Topics.h" \ "$(includedir)\IceStorm\IceStorm.h" \ "$(includedir)\IceStorm\Metrics.h" \ @@ -7665,6 +7708,7 @@ WellKnownObjectsManager.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\EvictorF.h" \ "$(includedir)\Freeze\ConnectionF.h" \ "$(includedir)\Freeze\Index.h" \ @@ -7826,6 +7870,7 @@ IceGridNode.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Activator.h" \ "Internal.h" \ "$(includedir)\Glacier2\Session.h" \ @@ -7990,6 +8035,7 @@ IceGridRegistry.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "RegistryI.h" \ "$(includedir)\IceGrid\Registry.h" \ "$(includedir)\IceGrid\Exception.h" \ diff --git a/cpp/src/IceGrid/IceGridAdmin.rc b/cpp/src/IceGrid/IceGridAdmin.rc index 38764a16dfe..091a3a7b1a8 100644 --- a/cpp/src/IceGrid/IceGridAdmin.rc +++ b/cpp/src/IceGrid/IceGridAdmin.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -19,12 +19,12 @@ BEGIN BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IceGrid Admin\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "icegridadmin\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "icegridadmin.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceGrid/IceGridNode.rc b/cpp/src/IceGrid/IceGridNode.rc index 30efd5e65d2..b6565bb0529 100644 --- a/cpp/src/IceGrid/IceGridNode.rc +++ b/cpp/src/IceGrid/IceGridNode.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -19,12 +19,12 @@ BEGIN BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IceGrid Node\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "icegridnode\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "icegridnode.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceGrid/IceGridRegistry.rc b/cpp/src/IceGrid/IceGridRegistry.rc index e61a4d9ebd1..e1e376a719a 100644 --- a/cpp/src/IceGrid/IceGridRegistry.rc +++ b/cpp/src/IceGrid/IceGridRegistry.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -19,12 +19,12 @@ BEGIN BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IceGrid Registry\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "icegridregistry\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "icegridregistry.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceGrid/Parser.cpp b/cpp/src/IceGrid/Parser.cpp index 1a821654366..b1792e8ffe8 100644 --- a/cpp/src/IceGrid/Parser.cpp +++ b/cpp/src/IceGrid/Parser.cpp @@ -267,9 +267,9 @@ void flushOutput() #endif } -void outputString(const string& s) -{ #ifdef _WIN32 +string toConsoleEncoding(const string& s) +{ if(windowsConsoleConverter) { try @@ -280,22 +280,33 @@ void outputString(const string& s) reinterpret_cast<const IceUtil::Byte*>(s.data() + s.size()), consoleString); - // We cannot use cout here as writing to console using cout - // will do its own conversion and will corrupt the messages. - // - fprintf_s(stdout, "%s", consoleString.c_str()); + return consoleString; } catch(const IceUtil::IllegalConversionException&) { // // If there is a problem with the encoding conversions we just - // write the original message without encoding conversions. + // return the original message without encoding conversions. // - fprintf_s(stdout, "%s", s.c_str()); + return s; } } else { + return s; + } +} +#endif + +void outputString(const string& s) +{ +#ifdef _WIN32 + if(windowsConsoleConverter) + { + fprintf_s(stdout, "%s", toConsoleEncoding(s).c_str()); + } + else + { // // Use fprintf_s to avoid encoding conversion when stdout is connected // to Windows console. @@ -663,12 +674,13 @@ Parser::describeApplication(const list<string>& args) list<string>::const_iterator p = args.begin(); string name = *p++; - - Output out(cout); + ostringstream os; + Output out(os); ApplicationInfo info = _admin->getApplicationInfo(name); ApplicationHelper helper(_communicator, info.descriptor); helper.print(out, info); out << nl; + outputString(os.str()); } catch(const Ice::Exception& ex) { @@ -732,7 +744,8 @@ Parser::diffApplication(const list<string>& origArgs) ApplicationHelper newAppHelper(_communicator, newApp); ApplicationHelper oldAppHelper(_communicator, origApp.descriptor); - Output out(cout); + ostringstream os; + Output out(os); if(opts.isSet("servers")) { map<string, ServerInfo> oldServers = oldAppHelper.getServerInfos(origApp.uuid, origApp.revision); @@ -782,7 +795,8 @@ Parser::diffApplication(const list<string>& origArgs) { newAppHelper.printDiff(out, oldAppHelper); } - out << nl; + out << nl; + outputString(os.str()); } catch(const Ice::Exception& ex) { @@ -913,7 +927,9 @@ Parser::listAllApplications(const list<string>& args) try { Ice::StringSeq names = _admin->getAllApplicationNames(); - copy(names.begin(), names.end(), ostream_iterator<string>(cout,"\n")); + ostringstream os; + copy(names.begin(), names.end(), ostream_iterator<string>(os,"\n")); + outputString(os.str()); } catch(const Ice::Exception& ex) { @@ -939,7 +955,8 @@ Parser::describeServerTemplate(const list<string>& args) ApplicationInfo application = _admin->getApplicationInfo(name); - Output out(cout); + ostringstream os; + Output out(os); TemplateDescriptorDict::const_iterator q = application.descriptor.serverTemplates.find(templ); if(q != application.descriptor.serverTemplates.end()) { @@ -966,6 +983,7 @@ Parser::describeServerTemplate(const list<string>& args) { error("no server template with id `" + templ + "'"); } + outputString(os.str()); } catch(const Ice::Exception& ex) { @@ -1028,7 +1046,8 @@ Parser::describeServiceTemplate(const list<string>& args) ApplicationInfo application = _admin->getApplicationInfo(name); - Output out(cout); + ostringstream os; + Output out(os); TemplateDescriptorDict::const_iterator q = application.descriptor.serviceTemplates.find(templ); if(q != application.descriptor.serviceTemplates.end()) { @@ -1047,6 +1066,7 @@ Parser::describeServiceTemplate(const list<string>& args) { invalidCommand("no service template with id `" + templ + "'"); } + outputString(os.str()); } catch(const Ice::Exception& ex) { @@ -1066,7 +1086,8 @@ Parser::describeNode(const list<string>& args) try { NodeInfo info = _admin->getNodeInfo(args.front()); - Output out(cout); + ostringstream os; + Output out(os); out << "node `" << args.front() << "'"; out << sb; out << nl << "operating system = `" << info.os << "'"; @@ -1077,6 +1098,7 @@ Parser::describeNode(const list<string>& args) out << nl << "number of threads = `" << info.nProcessors << "'"; out << eb; out << nl; + outputString(os.str()); } catch(const Ice::Exception& ex) { @@ -1250,12 +1272,14 @@ Parser::describeRegistry(const list<string>& args) try { RegistryInfo info = _admin->getRegistryInfo(args.front()); - Output out(cout); + ostringstream os; + Output out(os); out << "registry `" << args.front() << "'"; out << sb; out << nl << "host name = `" << info.hostname << "'"; out << eb; out << nl; + outputString(os.str()); } catch(const Ice::Exception& ex) { @@ -1513,7 +1537,8 @@ Parser::describeServer(const list<string>& args) try { ServerInfo info = _admin->getServerInfo(args.front()); - Output out(cout); + ostringstream os; + Output out(os); IceBoxDescriptorPtr iceBox = IceBoxDescriptorPtr::dynamicCast(info.descriptor); if(iceBox) { @@ -1524,6 +1549,7 @@ Parser::describeServer(const list<string>& args) ServerHelper(info.descriptor).print(_communicator, out, info); } out << nl; + outputString(os.str()); } catch(const Ice::Exception& ex) { @@ -1812,7 +1838,8 @@ Parser::describeService(const list<string>& args) return; } - Output out(cout); + ostringstream os; + Output out(os); bool found = false; for(ServiceInstanceDescriptorSeq::const_iterator p = iceBox->services.begin(); p != iceBox->services.end(); ++p) { @@ -1824,6 +1851,7 @@ Parser::describeService(const list<string>& args) break; } } + outputString(os.str()); if(!found) { @@ -2618,7 +2646,6 @@ Parser::getInput(char* buf, size_t& result, size_t maxSize) free(line); } } - #else cout << parser->getPrompt() << flush; @@ -2782,7 +2809,14 @@ Parser::patchFailed(const Ice::StringSeq& reasons) void Parser::error(const char* s) { - cerr << "error: " << s << endl; + + cerr << "error: " +#ifdef _WIN32 + << toConsoleEncoding(s) +#else + << s +#endif + << endl; _errors++; } @@ -2795,7 +2829,13 @@ Parser::error(const string& s) void Parser::warning(const char* s) { - cerr << "warning: " << s << endl; + cerr << "warning: " +#ifdef _WIN32 + << toConsoleEncoding(s) +#else + << s +#endif + << endl; } void diff --git a/cpp/src/IceGridLib/IceGrid.rc b/cpp/src/IceGridLib/IceGrid.rc index cb90d223d37..caf029ccd79 100644 --- a/cpp/src/IceGridLib/IceGrid.rc +++ b/cpp/src/IceGridLib/IceGrid.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "IceGrid DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "IceGrid C++ Client Library\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceLocatorDiscovery/.depend.mak b/cpp/src/IceLocatorDiscovery/.depend.mak index ffec3653307..f1487dcdf54 100755 --- a/cpp/src/IceLocatorDiscovery/.depend.mak +++ b/cpp/src/IceLocatorDiscovery/.depend.mak @@ -132,6 +132,7 @@ PluginI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "PluginI.h" \ "IceLocatorDiscovery.h" \ diff --git a/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.rc b/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.rc index 82272cb64b9..176ee125b1a 100755 --- a/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.rc +++ b/cpp/src/IceLocatorDiscovery/IceLocatorDiscovery.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Ice Locator Discovery DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "IceLocatorDiscovery C++ Plug-in\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceLocatorDiscovery/PluginI.cpp b/cpp/src/IceLocatorDiscovery/PluginI.cpp index 3c3c22ca89e..bf30aa4cf8e 100644 --- a/cpp/src/IceLocatorDiscovery/PluginI.cpp +++ b/cpp/src/IceLocatorDiscovery/PluginI.cpp @@ -38,6 +38,17 @@ createIceLocatorDiscovery(const Ice::CommunicatorPtr& communicator, const string } +namespace Ice +{ + +ICE_LOCATOR_DISCOVERY_API void +registerIceLocatorDiscovery(bool loadOnInitialize) +{ + Ice::registerPluginFactory("IceLocatorDiscovery", createIceLocatorDiscovery, loadOnInitialize); +} + +} + namespace { diff --git a/cpp/src/IcePatch2/.depend.mak b/cpp/src/IcePatch2/.depend.mak index 4191acf7cb0..ee0e03890d6 100755 --- a/cpp/src/IcePatch2/.depend.mak +++ b/cpp/src/IcePatch2/.depend.mak @@ -124,6 +124,7 @@ FileServerI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IcePatch2\FileInfo.h" \ "$(includedir)\IcePatch2\Config.h" \ "$(includedir)\IcePatch2\FileServer.h" \ @@ -253,6 +254,7 @@ Server.obj: \ "$(includedir)\Ice\Metrics.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "FileServerI.h" \ "..\..\src\IcePatch2Lib\Util.h" \ "$(includedir)\IcePatch2\FileInfo.h" \ @@ -382,6 +384,7 @@ Client.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "..\..\src\IcePatch2Lib\Util.h" \ "$(includedir)\IcePatch2\FileInfo.h" \ "$(includedir)\IcePatch2\Config.h" \ @@ -513,5 +516,6 @@ Calc.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IcePatch2\FileInfo.h" \ "$(includedir)\IcePatch2\Config.h" \ diff --git a/cpp/src/IcePatch2/IcePatch2Calc.rc b/cpp/src/IcePatch2/IcePatch2Calc.rc index f7fbde9ad7a..eace908e9fe 100644 --- a/cpp/src/IcePatch2/IcePatch2Calc.rc +++ b/cpp/src/IcePatch2/IcePatch2Calc.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -19,12 +19,12 @@ BEGIN BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IcePatch2 Calc\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "icepatch2calc\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "icepatch2calc.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IcePatch2/IcePatch2Client.rc b/cpp/src/IcePatch2/IcePatch2Client.rc index f50943d43a8..b14e93c7dc8 100644 --- a/cpp/src/IcePatch2/IcePatch2Client.rc +++ b/cpp/src/IcePatch2/IcePatch2Client.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -19,12 +19,12 @@ BEGIN BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IcePatch2 Client\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "icepatch2client\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "icepatch2client.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IcePatch2/IcePatch2Server.rc b/cpp/src/IcePatch2/IcePatch2Server.rc index 0a2540c67ca..9a1c8da79f1 100644 --- a/cpp/src/IcePatch2/IcePatch2Server.rc +++ b/cpp/src/IcePatch2/IcePatch2Server.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -19,12 +19,12 @@ BEGIN BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IcePatch2 Server\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "icepatch2server\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "icepatch2server.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IcePatch2Lib/.depend.mak b/cpp/src/IcePatch2Lib/.depend.mak index cb6515d4520..32ebf0f27a2 100755 --- a/cpp/src/IcePatch2Lib/.depend.mak +++ b/cpp/src/IcePatch2Lib/.depend.mak @@ -131,6 +131,7 @@ ClientUtil.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IcePatch2\FileServer.h" \ "$(includedir)\IcePatch2\FileInfo.h" \ "$(includedir)\IcePatch2\Config.h" \ @@ -267,6 +268,7 @@ Util.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IcePatch2\FileInfo.h" \ "$(includedir)\IcePatch2\Config.h" \ "$(includedir)\IcePatch2\FileServer.h" \ diff --git a/cpp/src/IcePatch2Lib/IcePatch2.rc b/cpp/src/IcePatch2Lib/IcePatch2.rc index becd955a8fe..c5cb1eee34c 100644 --- a/cpp/src/IcePatch2Lib/IcePatch2.rc +++ b/cpp/src/IcePatch2Lib/IcePatch2.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "IcePatch2 DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "IcePatch2 Client Library\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IcePatch2Lib/Makefile.mak b/cpp/src/IcePatch2Lib/Makefile.mak index ea8a7e04b4a..152fdef69ec 100755 --- a/cpp/src/IcePatch2Lib/Makefile.mak +++ b/cpp/src/IcePatch2Lib/Makefile.mak @@ -26,7 +26,9 @@ SDIR = $(slicedir)\IcePatch2 !include $(top_srcdir)\config\Make.rules.mak -CPPFLAGS = -I. -I.. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN -wd4996 +$(OBJS) : $(BZIP2_NUPKG) + +CPPFLAGS = -I. -I.. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN -wd4996 $(BZIP2_CPPFLAGS) SLICE2CPPFLAGS = --ice --include-dir IcePatch2 --dll-export ICE_PATCH2_API $(SLICE2CPPFLAGS) @@ -39,7 +41,7 @@ RES_FILE = IcePatch2.res $(LIBNAME): $(DLLNAME) $(DLLNAME): $(OBJS) IcePatch2.res - $(LINK) $(BASE):0x29000000 $(LD_DLLFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) $(BZIP2_LIBS) \ + $(LINK) $(BASE):0x29000000 $(LD_DLLFLAGS) $(BZIP2_LDFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS) $(BZIP2_LIBS) \ $(RES_FILE) move $(DLLNAME:.dll=.lib) $(LIBNAME) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ diff --git a/cpp/src/IceSSL/IceSSL.rc b/cpp/src/IceSSL/IceSSL.rc index e09c52e9a04..092a507e0aa 100644 --- a/cpp/src/IceSSL/IceSSL.rc +++ b/cpp/src/IceSSL/IceSSL.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "IceSSL DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "IceSSL C++ Plug-in\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceSSL/PluginI.cpp b/cpp/src/IceSSL/PluginI.cpp index 44b5bcecad3..41dbda52c22 100644 --- a/cpp/src/IceSSL/PluginI.cpp +++ b/cpp/src/IceSSL/PluginI.cpp @@ -34,6 +34,17 @@ createIceSSL(const CommunicatorPtr& communicator, const string& /*name*/, const } +namespace Ice +{ + +ICE_SSL_API void +registerIceSSL(bool loadOnInitialize) +{ + Ice::registerPluginFactory("IceSSL", createIceSSL, loadOnInitialize); +} + +} + // // Plugin implementation. // diff --git a/cpp/src/IceSSL/SChannelTransceiverI.cpp b/cpp/src/IceSSL/SChannelTransceiverI.cpp index 126a966f6b3..2b842769b09 100644 --- a/cpp/src/IceSSL/SChannelTransceiverI.cpp +++ b/cpp/src/IceSSL/SChannelTransceiverI.cpp @@ -774,6 +774,13 @@ IceSSL::TransceiverI::close() } _stream->close(); + + // + // Clear the buffers now instead of waiting for destruction. + // + _writeBuffer.b.clear(); + _readBuffer.b.clear(); + _readUnprocessed.b.clear(); } IceInternal::SocketOperation diff --git a/cpp/src/IceStorm/.depend.mak b/cpp/src/IceStorm/.depend.mak index b8083cfe1c5..731b5d71418 100755 --- a/cpp/src/IceStorm/.depend.mak +++ b/cpp/src/IceStorm/.depend.mak @@ -236,6 +236,7 @@ Instance.obj: \ "$(includedir)\Ice\NativePropertiesAdmin.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\IceUtil.h" \ "$(includedir)\IceUtil\AbstractMutex.h" \ "$(includedir)\IceUtil\Cache.h" \ @@ -483,6 +484,7 @@ LLUMap.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -617,6 +619,7 @@ NodeI.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Election.h" \ "SubscriberRecord.h" \ "$(includedir)\IceStorm\IceStorm.h" \ @@ -750,6 +753,7 @@ Observers.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\IceUtil.h" \ "$(includedir)\IceUtil\AbstractMutex.h" \ "$(includedir)\IceUtil\Cache.h" \ @@ -901,6 +905,7 @@ Service.obj: \ "$(includedir)\Ice\NativePropertiesAdmin.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\EvictorF.h" \ "$(includedir)\Freeze\ConnectionF.h" \ "$(includedir)\Freeze\Index.h" \ @@ -1078,6 +1083,7 @@ Subscriber.obj: \ "$(includedir)\Ice\NativePropertiesAdmin.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Replica.h" \ "Util.h" \ "$(includedir)\Freeze\Freeze.h" \ @@ -1220,6 +1226,7 @@ SubscriberMap.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -1360,6 +1367,7 @@ TopicI.obj: \ "$(includedir)\Ice\NativePropertiesAdmin.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\EvictorF.h" \ "$(includedir)\Freeze\ConnectionF.h" \ "$(includedir)\Freeze\Index.h" \ @@ -1516,6 +1524,7 @@ TopicManagerI.obj: \ "$(includedir)\Ice\NativePropertiesAdmin.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Election.h" \ "SubscriberRecord.h" \ "LLURecord.h" \ @@ -1764,6 +1773,7 @@ TransientTopicI.obj: \ "$(includedir)\Ice\NativePropertiesAdmin.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\Freeze.h" \ "$(includedir)\Freeze\Initialize.h" \ "$(includedir)\Freeze\EvictorF.h" \ @@ -1915,6 +1925,7 @@ TransientTopicManagerI.obj: \ "$(includedir)\Ice\NativePropertiesAdmin.h" \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ Util.obj: \ Util.cpp \ @@ -2037,6 +2048,7 @@ Util.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\Freeze.h" \ "$(includedir)\Freeze\Initialize.h" \ "$(includedir)\Freeze\EvictorF.h" \ @@ -2179,6 +2191,7 @@ V31FormatDB.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -2316,6 +2329,7 @@ V32FormatDB.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\DB.h" \ "$(includedir)\Freeze\Exception.h" \ "$(includedir)\Freeze\Connection.h" \ @@ -3114,6 +3128,7 @@ Admin.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Parser.h" \ "$(includedir)\IceStorm\IceStorm.h" \ "$(includedir)\IceStorm\Metrics.h" \ @@ -3240,6 +3255,7 @@ Parser.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Parser.h" \ "$(includedir)\IceStorm\IceStorm.h" \ "$(includedir)\IceStorm\Metrics.h" \ @@ -3369,6 +3385,7 @@ Grammar.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Parser.h" \ "$(includedir)\IceStorm\IceStorm.h" \ "$(includedir)\IceStorm\Metrics.h" \ @@ -3495,6 +3512,7 @@ Scanner.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "Parser.h" \ "$(includedir)\IceStorm\IceStorm.h" \ "$(includedir)\IceStorm\Metrics.h" \ @@ -3623,6 +3641,7 @@ Migrate.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\Freeze\EvictorF.h" \ "$(includedir)\Freeze\ConnectionF.h" \ "$(includedir)\Freeze\Index.h" \ diff --git a/cpp/src/IceStorm/IceStormAdmin.rc b/cpp/src/IceStorm/IceStormAdmin.rc index 66849978b8a..4ec3f2d01ec 100644 --- a/cpp/src/IceStorm/IceStormAdmin.rc +++ b/cpp/src/IceStorm/IceStormAdmin.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -19,12 +19,12 @@ BEGIN BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" VALUE "FileDescription", "IceStorm Admin\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "icestormadmin\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "icestormadmin.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceStorm/IceStormMigrate.rc b/cpp/src/IceStorm/IceStormMigrate.rc index 9d7d8e90570..e8ba76a7fe2 100644 --- a/cpp/src/IceStorm/IceStormMigrate.rc +++ b/cpp/src/IceStorm/IceStormMigrate.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "IceStorm Migrate\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Migration Utility for IceStorm Database\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "icestormmigrate\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "icestormmigrate.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceStorm/IceStormService.rc b/cpp/src/IceStorm/IceStormService.rc index b7b34c36f8e..bd6d844e25f 100644 --- a/cpp/src/IceStorm/IceStormService.rc +++ b/cpp/src/IceStorm/IceStormService.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "IceStorm Service DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "IceStorm C++ Service for IceBox\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceStorm/Instance.cpp b/cpp/src/IceStorm/Instance.cpp index 0f022b4e77c..35c74c96ba3 100644 --- a/cpp/src/IceStorm/Instance.cpp +++ b/cpp/src/IceStorm/Instance.cpp @@ -22,6 +22,22 @@ using namespace std; using namespace IceStorm; using namespace IceStormElection; +void +TopicReaper::add(const string& name) +{ + Lock sync(*this); + _topics.push_back(name); +} + +vector<string> +TopicReaper::consumeReapedTopics() +{ + Lock sync(*this); + vector<string> reaped; + reaped.swap(_topics); + return reaped; +} + Instance::Instance( const string& instanceName, const string& name, @@ -43,7 +59,8 @@ Instance::Instance( _flushInterval(IceUtil::Time::milliSeconds(communicator->getProperties()->getPropertyAsIntWithDefault( name + ".Flush.Timeout", 1000))), // default one second. // default one minute. - _sendTimeout(communicator->getProperties()->getPropertyAsIntWithDefault(name + ".Send.Timeout", 60 * 1000)) + _sendTimeout(communicator->getProperties()->getPropertyAsIntWithDefault(name + ".Send.Timeout", 60 * 1000)), + _topicReaper(new TopicReaper()) { try { @@ -66,12 +83,12 @@ Instance::Instance( _observers = new Observers(this); _batchFlusher = new IceUtil::Timer(); _timer = new IceUtil::Timer(); - + // // If an Ice metrics observer is setup on the communicator, also // enable metrics for IceStorm. // - IceInternal::CommunicatorObserverIPtr o = + IceInternal::CommunicatorObserverIPtr o = IceInternal::CommunicatorObserverIPtr::dynamicCast(communicator->getObserver()); if(o) { @@ -196,6 +213,12 @@ Instance::observer() const return _observer; } +IceStorm::TopicReaperPtr +Instance::topicReaper() const +{ + return _topicReaper; +} + IceUtil::Time Instance::discardInterval() const { diff --git a/cpp/src/IceStorm/Instance.h b/cpp/src/IceStorm/Instance.h index 3e299722866..02e78a26c00 100644 --- a/cpp/src/IceStorm/Instance.h +++ b/cpp/src/IceStorm/Instance.h @@ -43,11 +43,24 @@ namespace IceStorm class TraceLevels; typedef IceUtil::Handle<TraceLevels> TraceLevelsPtr; +class TopicReaper : public IceUtil::Shared, private IceUtil::Mutex +{ +public: + + void add(const std::string&); + std::vector<std::string> consumeReapedTopics(); + +private: + + std::vector<std::string> _topics; +}; +typedef IceUtil::Handle<TopicReaper> TopicReaperPtr; + class Instance : public IceUtil::Shared { public: - Instance(const std::string&, const std::string&, const Ice::CommunicatorPtr&, const Ice::ObjectAdapterPtr&, + Instance(const std::string&, const std::string&, const Ice::CommunicatorPtr&, const Ice::ObjectAdapterPtr&, const Ice::ObjectAdapterPtr&, const Ice::ObjectAdapterPtr& = 0, const IceStormElection::NodePrx& = 0); ~Instance(); @@ -69,6 +82,7 @@ public: Ice::ObjectPrx topicReplicaProxy() const; Ice::ObjectPrx publisherReplicaProxy() const; IceStorm::Instrumentation::TopicManagerObserverPtr observer() const; + TopicReaperPtr topicReaper() const; IceUtil::Time discardInterval() const; IceUtil::Time flushInterval() const; @@ -92,6 +106,7 @@ private: const int _sendTimeout; const Ice::ObjectPrx _topicReplicaProxy; const Ice::ObjectPrx _publisherReplicaProxy; + const TopicReaperPtr _topicReaper; IceStormElection::NodeIPtr _node; IceStormElection::ObserversPtr _observers; IceUtil::TimerPtr _batchFlusher; diff --git a/cpp/src/IceStorm/Service.cpp b/cpp/src/IceStorm/Service.cpp index 450f765d9e7..9cfc1bb4139 100644 --- a/cpp/src/IceStorm/Service.cpp +++ b/cpp/src/IceStorm/Service.cpp @@ -489,7 +489,6 @@ ServiceI::validateProperties(const string& name, const PropertiesPtr& properties "Publish.Endpoints", "Publish.Locator", "Publish.PublishedEndpoints", - "Publish.RegisterProcess", "Publish.ReplicaGroupId", "Publish.Router", "Publish.ThreadPool.Size", @@ -500,7 +499,6 @@ ServiceI::validateProperties(const string& name, const PropertiesPtr& properties "Node.Endpoints", "Node.Locator", "Node.PublishedEndpoints", - "Node.RegisterProcess", "Node.ReplicaGroupId", "Node.Router", "Node.ThreadPool.Size", @@ -519,7 +517,6 @@ ServiceI::validateProperties(const string& name, const PropertiesPtr& properties "TopicManager.Proxy.Router", "TopicManager.Proxy.CollocationOptimization", "TopicManager.PublishedEndpoints", - "TopicManager.RegisterProcess", "TopicManager.ReplicaGroupId", "TopicManager.Router", "TopicManager.ThreadPool.Size", diff --git a/cpp/src/IceStorm/TopicI.cpp b/cpp/src/IceStorm/TopicI.cpp index d6929510e37..422e3456383 100644 --- a/cpp/src/IceStorm/TopicI.cpp +++ b/cpp/src/IceStorm/TopicI.cpp @@ -1261,6 +1261,7 @@ TopicImpl::destroyInternal(const LogUpdate& origLLU, bool master) { _instance->publishAdapter()->remove(_linkPrx->ice_getIdentity()); _instance->publishAdapter()->remove(_publisherPrx->ice_getIdentity()); + _instance->topicReaper()->add(_name); // Destroy each of the subscribers. for(vector<SubscriberPtr>::const_iterator p = _subscribers.begin(); p != _subscribers.end(); ++p) diff --git a/cpp/src/IceStorm/TopicManagerI.cpp b/cpp/src/IceStorm/TopicManagerI.cpp index bca2b02e5a3..0de2ab58aa9 100644 --- a/cpp/src/IceStorm/TopicManagerI.cpp +++ b/cpp/src/IceStorm/TopicManagerI.cpp @@ -808,16 +808,13 @@ TopicManagerImpl::reap() // // Lock sync(*this); // - map<string, TopicImplPtr>::iterator p = _topics.begin(); - while(p != _topics.end()) + vector<string> reaped = _instance->topicReaper()->consumeReapedTopics(); + for(vector<string>::const_iterator p = reaped.begin(); p != reaped.end(); ++p) { - if(p->second->destroyed()) + map<string, TopicImplPtr>::iterator q = _topics.find(*p); + if(q != _topics.end() && q->second->destroyed()) { - _topics.erase(p++); - } - else - { - ++p; + _topics.erase(q); } } } diff --git a/cpp/src/IceStorm/TransientTopicManagerI.cpp b/cpp/src/IceStorm/TransientTopicManagerI.cpp index 28213fabaab..9099a7409ec 100644 --- a/cpp/src/IceStorm/TransientTopicManagerI.cpp +++ b/cpp/src/IceStorm/TransientTopicManagerI.cpp @@ -142,10 +142,11 @@ TransientTopicManagerImpl::reap() // // Lock sync(*this); // - map<string, TransientTopicImplPtr>::iterator i = _topics.begin(); - while(i != _topics.end()) + vector<string> reaped = _instance->topicReaper()->consumeReapedTopics(); + for(vector<string>::const_iterator p = reaped.begin(); p != reaped.end(); ++p) { - if(i->second->destroyed()) + map<string, TransientTopicImplPtr>::iterator i = _topics.find(*p); + if(i != _topics.end() && i->second->destroyed()) { Ice::Identity id = i->second->id(); TraceLevelsPtr traceLevels = _instance->traceLevels(); @@ -164,11 +165,7 @@ TransientTopicManagerImpl::reap() // Ignore } - _topics.erase(i++); - } - else - { - ++i; + _topics.erase(i); } } } diff --git a/cpp/src/IceStormLib/IceStorm.rc b/cpp/src/IceStormLib/IceStorm.rc index d64412f0d71..3fcecd3a282 100644 --- a/cpp/src/IceStormLib/IceStorm.rc +++ b/cpp/src/IceStormLib/IceStorm.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "IceStorm DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "IceStorm C++ Client Library\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceUtil/Exception.cpp b/cpp/src/IceUtil/Exception.cpp index 947815467d6..886ff276b7d 100644 --- a/cpp/src/IceUtil/Exception.cpp +++ b/cpp/src/IceUtil/Exception.cpp @@ -29,7 +29,8 @@ #include <cstdlib> -#if defined(__GNUC__) && !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) +#if defined(__GNUC__) && !defined(__sun) && !defined(__FreeBSD__) && !defined(__MINGW32__) && \ + !(defined(__ARMEL__) && defined(__linux)) # include <execinfo.h> # include <cxxabi.h> # define ICE_GCC_STACK_TRACES diff --git a/cpp/src/IceUtil/IceUtil.rc b/cpp/src/IceUtil/IceUtil.rc index 5828ea9c3a0..976b795ee81 100644 --- a/cpp/src/IceUtil/IceUtil.rc +++ b/cpp/src/IceUtil/IceUtil.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Ice Utilities DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Ice C++ Utility Library\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceXML/IceXML.rc b/cpp/src/IceXML/IceXML.rc index 2ba1dc3cf83..87d1bc8fc77 100644 --- a/cpp/src/IceXML/IceXML.rc +++ b/cpp/src/IceXML/IceXML.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "IceXML DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "IceXML C++ Library\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/IceXML/Makefile.mak b/cpp/src/IceXML/Makefile.mak index 2ff9670c3df..79b9847ce0f 100644 --- a/cpp/src/IceXML/Makefile.mak +++ b/cpp/src/IceXML/Makefile.mak @@ -20,7 +20,9 @@ SRCS = $(OBJS:.obj=.cpp) !include $(top_srcdir)/config/Make.rules.mak -CPPFLAGS = -I.. $(CPPFLAGS) -DICE_XML_API_EXPORTS -DWIN32_LEAN_AND_MEAN +$(OBJS) : $(EXPAT_NUPKG) + +CPPFLAGS = -I.. $(CPPFLAGS) -DICE_XML_API_EXPORTS -DWIN32_LEAN_AND_MEAN $(EXPAT_CPPFLAGS) LINKWITH = $(EXPAT_LIBS) $(BASELIBS) @@ -33,7 +35,7 @@ RES_FILE = IceXML.res $(LIBNAME): $(DLLNAME) $(DLLNAME): $(OBJS) IceXML.res - $(LINK) $(BASE):0x23000000 $(LD_DLLFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) $(RES_FILE) + $(LINK) $(BASE):0x23000000 $(LD_DLLFLAGS) $(EXPAT_LDFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(LINKWITH) $(RES_FILE) move $(DLLNAME:.dll=.lib) $(LIBNAME) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#2 && del /q $@.manifest diff --git a/cpp/src/Makefile.mak b/cpp/src/Makefile.mak index 2c8af56621f..409ab6e455e 100644 --- a/cpp/src/Makefile.mak +++ b/cpp/src/Makefile.mak @@ -13,7 +13,7 @@ top_srcdir = .. !if "$(WINRT)" == "yes" SUBDIRS = IceUtil Slice slice2cpp -SUBDIRS_WINRT = IceUtil\winrt \ +SUBDIRS_WINRT = IceUtil\winrt \ Ice\winrt \ Glacier2Lib\winrt \ IceStormLib\winrt \ diff --git a/cpp/src/Slice/Makefile b/cpp/src/Slice/Makefile index 5f04ffd7361..a949633a871 100644 --- a/cpp/src/Slice/Makefile +++ b/cpp/src/Slice/Makefile @@ -47,7 +47,7 @@ $(libdir)/$(LIBNAME): $(OBJS) rm -f $@ $(call mklib,$@,$(OBJS)) else -$(libdir)/$(LIBFILENAME): $(OBJS) +$(libdir)/$(LIBFILENAME): $(OBJS) $(MCPP_NUPKG) @mkdir -p $(dir $@) rm -f $@ $(call mkshlib,$@,$(SONAME),$(OBJS),$(LINKWITH)) diff --git a/cpp/src/Slice/Makefile.mak b/cpp/src/Slice/Makefile.mak index fbdb58f45d5..4f42758f290 100644 --- a/cpp/src/Slice/Makefile.mak +++ b/cpp/src/Slice/Makefile.mak @@ -33,10 +33,12 @@ OBJS = .\Checksum.obj \ .\RubyUtil.obj \ .\Util.obj \ .\Ruby.obj \ - $(BISON_FLEX_OBJS) + $(BISON_FLEX_OBJS) !include $(top_srcdir)/config/Make.rules.mak +$(OBJS) : $(MCPP_NUPKG) + CPPFLAGS = -I.. $(CPPFLAGS) -DSLICE_API_EXPORTS -DWIN32_LEAN_AND_MEAN BISONFLAGS = --name-prefix "slice_" $(BISONFLAGS) @@ -58,7 +60,7 @@ $(LIBNAME): $(OBJS) $(LIBNAME): $(DLLNAME) $(DLLNAME): $(OBJS) Slice.res - $(LINK) $(BASE):0x21000000 $(LD_DLLFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(BASELIBS) $(MCPP_LIBS) \ + $(LINK) $(BASE):0x21000000 $(LD_DLLFLAGS) $(MCPP_LDFLAGS) $(PDBFLAGS) $(OBJS) $(PREOUT)$@ $(PRELIBS)$(BASELIBS) $(MCPP_LIBS) \ $(RES_FILE) move $(DLLNAME:.dll=.lib) $(LIBNAME) @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 8a138ebf4a0..07df9c2f75e 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -1309,23 +1309,19 @@ Slice::Container::lookupTypeNoBuiltin(const string& scoped, bool printError, boo } return TypeList(); } - if(typeError && results.empty() && printError) - { - for(vector<string>::const_iterator p = errors.begin(); p != errors.end(); ++p) - { - _unit->error(*p); - } - } - return results; } - else + + // + // Do not emit errors if there was a type error but a match was found in a higher scope. + // + if(printError && !(typeError && !results.empty())) { for(vector<string>::const_iterator p = errors.begin(); p != errors.end(); ++p) { _unit->error(*p); } - return results; } + return results; } ContainedList diff --git a/cpp/src/Slice/Python.cpp b/cpp/src/Slice/Python.cpp index 33490740e8b..f93701fff11 100644 --- a/cpp/src/Slice/Python.cpp +++ b/cpp/src/Slice/Python.cpp @@ -434,6 +434,7 @@ Slice::Python::compile(int argc, char* argv[]) opts.addOpt("", "underscore"); opts.addOpt("", "all"); opts.addOpt("", "no-package"); + opts.addOpt("", "build-package"); opts.addOpt("", "checksum"); opts.addOpt("", "prefix", IceUtilInternal::Options::NeedArg); @@ -500,6 +501,8 @@ Slice::Python::compile(int argc, char* argv[]) bool noPackage = opts.isSet("no-package"); + bool buildPackage = opts.isSet("build-package"); + bool checksum = opts.isSet("checksum"); string prefix = opts.optArg("prefix"); @@ -518,6 +521,13 @@ Slice::Python::compile(int argc, char* argv[]) return EXIT_FAILURE; } + if(noPackage && buildPackage) + { + getErrorStream() << argv[0] << ": error: cannot specify both --no-package and --build-package" << endl; + usage(argv[0]); + return EXIT_FAILURE; + } + int status = EXIT_SUCCESS; IceUtil::CtrlCHandler ctrlCHandler; @@ -563,8 +573,8 @@ Slice::Python::compile(int argc, char* argv[]) return EXIT_FAILURE; } - if(!icecpp->printMakefileDependencies(out.os(), depend ? Preprocessor::Python : Preprocessor::SliceXML, includePaths, - "-D__SLICE2PY__", "", prefix)) + if(!icecpp->printMakefileDependencies(out.os(), depend ? Preprocessor::Python : Preprocessor::SliceXML, + includePaths, "-D__SLICE2PY__", "", prefix)) { out.cleanup(); return EXIT_FAILURE; @@ -618,45 +628,52 @@ Slice::Python::compile(int argc, char* argv[]) } else { - string base = icecpp->getBaseName(); - string::size_type pos = base.find_last_of("/\\"); - if(pos != string::npos) - { - base.erase(0, pos + 1); - } - - // - // Append the suffix "_ice" to the filename in order to avoid any conflicts - // with Slice module names. For example, if the file Test.ice defines a - // Slice module named "Test", then we couldn't create a Python package named - // "Test" and also call the generated file "Test.py". - // - string file = prefix + base + "_ice.py"; - if(!output.empty()) - { - file = output + '/' + file; - } - try { - IceUtilInternal::Output out; - out.open(file.c_str()); - if(!out) + string base = icecpp->getBaseName(); + string::size_type pos = base.find_last_of("/\\"); + if(pos != string::npos) { - ostringstream os; - os << "cannot open`" << file << "': " << strerror(errno); - throw FileException(__FILE__, __LINE__, os.str()); + base.erase(0, pos + 1); } - FileTracker::instance()->addFile(file); - printHeader(out); - printGeneratedHeader(out, base + ".ice", "#"); // - // Generate the Python mapping. + // If --build-package is specified, we don't generate any code and simply + // update the __init__.py files. // - generate(u, all, checksum, includePaths, out); - - out.close(); + if(!buildPackage) + { + // + // Append the suffix "_ice" to the filename in order to avoid any conflicts + // with Slice module names. For example, if the file Test.ice defines a + // Slice module named "Test", then we couldn't create a Python package named + // "Test" and also call the generated file "Test.py". + // + string file = prefix + base + "_ice.py"; + if(!output.empty()) + { + file = output + '/' + file; + } + + IceUtilInternal::Output out; + out.open(file.c_str()); + if(!out) + { + ostringstream os; + os << "cannot open`" << file << "': " << strerror(errno); + throw FileException(__FILE__, __LINE__, os.str()); + } + FileTracker::instance()->addFile(file); + + printHeader(out); + printGeneratedHeader(out, base + ".ice", "#"); + // + // Generate the Python mapping. + // + generate(u, all, checksum, includePaths, out); + + out.close(); + } // // Create or update the Python package hierarchy. @@ -668,8 +685,9 @@ Slice::Python::compile(int argc, char* argv[]) } catch(const Slice::FileException& ex) { - // If a file could not be created, then cleanup any - // created files. + // + // If a file could not be created, then clean up any created files. + // FileTracker::instance()->cleanup(); u->destroy(); getErrorStream() << argv[0] << ": error: " << ex.reason() << endl; diff --git a/cpp/src/Slice/Slice.rc b/cpp/src/Slice/Slice.rc index 4f01c4b89da..9b20c016126 100644 --- a/cpp/src/Slice/Slice.rc +++ b/cpp/src/Slice/Slice.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -22,13 +22,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Slice Utilities DLL\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Slice C++ Library\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", INTERNALNAME - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", ORIGINALFILENAME VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/iceserviceinstall/.depend.mak b/cpp/src/iceserviceinstall/.depend.mak index 30cfd1df230..13cdc98eb9c 100755 --- a/cpp/src/iceserviceinstall/.depend.mak +++ b/cpp/src/iceserviceinstall/.depend.mak @@ -120,6 +120,7 @@ ServiceInstaller.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\IceUtil.h" \ "$(includedir)\IceUtil\AbstractMutex.h" \ "$(includedir)\IceUtil\Cache.h" \ @@ -250,6 +251,7 @@ Install.obj: \ "$(includedir)\Ice\SliceChecksums.h" \ "$(includedir)\Ice\SliceChecksumDict.h" \ "$(includedir)\Ice\Service.h" \ + "$(includedir)\Ice\RegisterPlugins.h" \ "$(includedir)\IceUtil\Options.h" \ "$(includedir)\IceUtil\RecMutex.h" \ "ServiceInstaller.h" \ diff --git a/cpp/src/iceserviceinstall/IceServiceInstall.rc b/cpp/src/iceserviceinstall/IceServiceInstall.rc index b6bfdf32b77..12e61446b38 100644 --- a/cpp/src/iceserviceinstall/IceServiceInstall.rc +++ b/cpp/src/iceserviceinstall/IceServiceInstall.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Service Installer\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Install Ice Services as Windows Services\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "iceserviceinstall\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "iceserviceinstall.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/slice2confluence/Slice2Confluence.rc b/cpp/src/slice2confluence/Slice2Confluence.rc index 68395d56deb..5a070b983ff 100644 --- a/cpp/src/slice2confluence/Slice2Confluence.rc +++ b/cpp/src/slice2confluence/Slice2Confluence.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Slice To Confluence Markup Translator\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Slice to Confluence Markup Translator\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "slice2confluence\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "slice2confluence.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 73bff267ba7..e9e771bf64f 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -3879,7 +3879,6 @@ Slice::Gen::ObjectVisitor::emitVirtualBaseInitializers(const ClassDefPtr& p, boo upcall += ")"; H << nl << fixKwd(p->scoped()) << upcall; - H << nl; return true; } diff --git a/cpp/src/slice2cpp/Slice2Cpp.rc b/cpp/src/slice2cpp/Slice2Cpp.rc index f38e5171d6f..96df14a2cea 100644 --- a/cpp/src/slice2cpp/Slice2Cpp.rc +++ b/cpp/src/slice2cpp/Slice2Cpp.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Slice To C++ Translator\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Slice to C++ Translator\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "slice2cpp\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "slice2cpp.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/slice2cs/Slice2Cs.rc b/cpp/src/slice2cs/Slice2Cs.rc index 7119e6ed8ab..67bcf84be17 100644 --- a/cpp/src/slice2cs/Slice2Cs.rc +++ b/cpp/src/slice2cs/Slice2Cs.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Slice To C# Translator\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Slice to C# Translator\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "slice2cs\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "slice2cs.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/slice2freeze/Slice2Freeze.rc b/cpp/src/slice2freeze/Slice2Freeze.rc index 64ee33cb09c..afb72f9b04a 100644 --- a/cpp/src/slice2freeze/Slice2Freeze.rc +++ b/cpp/src/slice2freeze/Slice2Freeze.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Slice To Freeze Translator\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Slice to Freeze for C++ Translator\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "slice2freeze\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "slice2freeze.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/slice2freezej/Slice2FreezeJ.rc b/cpp/src/slice2freezej/Slice2FreezeJ.rc index 810aa269f4e..e1a4b5ef2b6 100644 --- a/cpp/src/slice2freezej/Slice2FreezeJ.rc +++ b/cpp/src/slice2freezej/Slice2FreezeJ.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Slice To Freeze for Java Translator\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Slice to Freeze for Java Translator\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "slice2freezej\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "slice2freezej.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/slice2html/Slice2Html.rc b/cpp/src/slice2html/Slice2Html.rc index 033ab06bd3c..9078160e8da 100644 --- a/cpp/src/slice2html/Slice2Html.rc +++ b/cpp/src/slice2html/Slice2Html.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Slice To HTML Translator\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Slice to HTML Translator\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "slice2html\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "slice2html.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/slice2java/Slice2Java.rc b/cpp/src/slice2java/Slice2Java.rc index f5c3b5870bb..a589969595d 100644 --- a/cpp/src/slice2java/Slice2Java.rc +++ b/cpp/src/slice2java/Slice2Java.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Slice To Java Translator\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Slice to Java Translator\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "slice2java\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "slice2java.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/slice2js/Slice2Js.rc b/cpp/src/slice2js/Slice2Js.rc index a0d6edd440e..2e9f2b19d39 100644 --- a/cpp/src/slice2js/Slice2Js.rc +++ b/cpp/src/slice2js/Slice2Js.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Slice To JavaScript Translator\0" - VALUE "FileVersion", "3.6.0\0" + VALUE "FileDescription", "Slice to JavaScript Translator\0" + VALUE "FileVersion", "3.6.1\0" VALUE "InternalName", "slice2js\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" VALUE "OriginalFilename", "slice2js.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/slice2php/Slice2PHP.rc b/cpp/src/slice2php/Slice2PHP.rc index f53b13c973f..7ba874e54f9 100644 --- a/cpp/src/slice2php/Slice2PHP.rc +++ b/cpp/src/slice2php/Slice2PHP.rc @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,6,0,0 - PRODUCTVERSION 3,6,0,0 + FILEVERSION 3,6,1,0 + PRODUCTVERSION 3,6,1,0 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -18,13 +18,13 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "Slice To Python Translator\0" - VALUE "FileVersion", "3.6.0\0" - VALUE "InternalName", "slice2py\0" - VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" - VALUE "OriginalFilename", "slice2py.exe\0" + VALUE "FileDescription", "Slice to PHP Translator\0" + VALUE "FileVersion", "3.6.1\0" + VALUE "InternalName", "slice2php\0" + VALUE "LegalCopyright", "\251 2003-2015 ZeroC, Inc.\0" + VALUE "OriginalFilename", "slice2php.exe\0" VALUE "ProductName", "Ice\0" - VALUE "ProductVersion", "3.6.0\0" + VALUE "ProductVersion", "3.6.1\0" END END BLOCK "VarFileInfo" diff --git a/cpp/src/slice2py/.depend.mak b/cpp/src/slice2py/.depend.mak new file mode 100755 index 00000000000..f3beb849c0f --- /dev/null +++ b/cpp/src/slice2py/.depend.mak @@ -0,0 +1,12 @@ + +Main.obj: \ + Main.cpp \ + "$(includedir)\Slice\PythonUtil.h" \ + "$(includedir)\Slice\Parser.h" \ + "$(includedir)\IceUtil\Shared.h" \ + "$(includedir)\IceUtil\Config.h" \ + "$(includedir)\IceUtil\Atomic.h" \ + "$(includedir)\IceUtil\Handle.h" \ + "$(includedir)\IceUtil\Exception.h" \ + "$(includedir)\IceUtil\OutputUtil.h" \ + "$(includedir)\Slice\Util.h" \ diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp new file mode 100644 index 00000000000..749749ff1bd --- /dev/null +++ b/cpp/src/slice2py/Main.cpp @@ -0,0 +1,44 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <Slice/PythonUtil.h> +#include <Slice/Util.h> + +using namespace std; +using namespace Slice; +using namespace Slice::Python; + +int +main(int argc, char* argv[]) +{ + try + { + return Slice::Python::compile(argc, argv); + } + catch(const std::exception& ex) + { + getErrorStream() << argv[0] << ": error:" << ex.what() << endl; + return EXIT_FAILURE; + } + catch(const std::string& msg) + { + getErrorStream() << argv[0] << ": error:" << msg << endl; + return EXIT_FAILURE; + } + catch(const char* msg) + { + getErrorStream() << argv[0] << ": error:" << msg << endl; + return EXIT_FAILURE; + } + catch(...) + { + getErrorStream() << argv[0] << ": error:" << "unknown exception" << endl; + return EXIT_FAILURE; + } +} diff --git a/cpp/src/slice2py/Makefile b/cpp/src/slice2py/Makefile new file mode 100644 index 00000000000..fdd58cf87c6 --- /dev/null +++ b/cpp/src/slice2py/Makefile @@ -0,0 +1,30 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +top_srcdir = ../.. + +NAME = $(bindir)/slice2py + +TARGETS = $(NAME) + +OBJS = Main.o + +RPATH_DIR = $(LOADER_PATH)/../$(libsubdir) + +include $(top_srcdir)/config/Make.rules + +CPPFLAGS := -I. $(CPPFLAGS) + +$(NAME): $(OBJS) + rm -f $@ + $(CXX) $(LDFLAGS) $(LDEXEFLAGS) -o $@ $(OBJS) $(SLICE_LIBS) $(MCPP_RPATH_LINK) + +install:: all + $(call installprogram,$(NAME),$(DESTDIR)$(install_bindir)) + $(call installdata,$(top_srcdir)/../man/man1/slice2py.1,$(DESTDIR)$(install_mandir)) diff --git a/cpp/src/slice2py/Makefile.mak b/cpp/src/slice2py/Makefile.mak new file mode 100644 index 00000000000..26f0247f146 --- /dev/null +++ b/cpp/src/slice2py/Makefile.mak @@ -0,0 +1,46 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +top_srcdir = ..\.. + +NAME = $(top_srcdir)\bin\slice2py.exe + +TARGETS = $(NAME) + +OBJS = .\Main.obj + +!include $(top_srcdir)/config/Make.rules.mak + +CPPFLAGS = -I. $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN + +!if "$(GENERATE_PDB)" == "yes" +PDBFLAGS = /pdb:$(NAME:.exe=.pdb) +!endif + +RES_FILE = Slice2Py.res + +$(NAME): $(OBJS) Slice2Py.res + $(LINK) $(LD_EXEFLAGS) $(PDBFLAGS) $(OBJS) $(SETARGV) $(PREOUT)$@ $(PRELIBS) \ + $(BASELIBS) $(RES_FILE) + @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \ + $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest + +clean:: + del /q $(NAME:.exe=.*) + del /q Slice2Py.res + +install:: all + copy $(NAME) "$(install_bindir)" + +!if "$(GENERATE_PDB)" == "yes" + +install:: all + copy $(NAME:.exe=.pdb) "$(install_bindir)" + +!endif diff --git a/cpp/src/IceStorm/IceStormDB.rc b/cpp/src/slice2py/Slice2Py.rc index ea5f92c82fa..f53b13c973f 100644 --- a/cpp/src/IceStorm/IceStormDB.rc +++ b/cpp/src/slice2py/Slice2Py.rc @@ -6,15 +6,11 @@ VS_VERSION_INFO VERSIONINFO FILEFLAGSMASK VS_FFI_FILEFLAGSMASK #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG - #define INTERNALNAME "icestormdb36d\0" - #define ORIGINALFILENAME "icestormdb36d.dll\0" #else FILEFLAGS 0x0L - #define INTERNALNAME "icestormdb36\0" - #define ORIGINALFILENAME "icestormdb36.dll\0" #endif FILEOS 0x4L - FILETYPE VFT_DLL + FILETYPE VFT_APP FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" @@ -22,11 +18,11 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "ZeroC, Inc.\0" - VALUE "FileDescription", "IceStorm DB DLL\0" + VALUE "FileDescription", "Slice To Python Translator\0" VALUE "FileVersion", "3.6.0\0" - VALUE "InternalName", INTERNALNAME + VALUE "InternalName", "slice2py\0" VALUE "LegalCopyright", "Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved.\0" - VALUE "OriginalFilename", ORIGINALFILENAME + VALUE "OriginalFilename", "slice2py.exe\0" VALUE "ProductName", "Ice\0" VALUE "ProductVersion", "3.6.0\0" END |