From ce13cb78a2335e95729b9a18ea157661aa77a4d4 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 30 May 2017 14:11:38 -0700 Subject: 1.4.x branch cut, version bump PR --- src/core/lib/surface/version.c | 2 +- src/cpp/common/version_cc.cc | 2 +- src/csharp/Grpc.Core/Version.csproj.include | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 2 +- src/csharp/build_packages_dotnetcli.bat | 2 +- src/csharp/build_packages_dotnetcli.sh | 4 ++-- src/node/health_check/package.json | 4 ++-- src/node/tools/package.json | 2 +- src/objective-c/!ProtoCompiler-gRPCPlugin.podspec | 2 +- src/objective-c/GRPCClient/private/version.h | 2 +- src/python/grpcio/grpc/_grpcio_metadata.py | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/python/grpcio_health_checking/grpc_version.py | 2 +- src/python/grpcio_reflection/grpc_version.py | 2 +- src/python/grpcio_tests/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- 17 files changed, 19 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index cddc595e4c..39dfebb948 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -36,6 +36,6 @@ #include -const char *grpc_version_string(void) { return "4.0.0-dev"; } +const char *grpc_version_string(void) { return "4.0.0-pre1"; } const char *grpc_g_stands_for(void) { return "gregarious"; } diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc index 72a4c4cf94..8359016c02 100644 --- a/src/cpp/common/version_cc.cc +++ b/src/cpp/common/version_cc.cc @@ -37,5 +37,5 @@ #include namespace grpc { -grpc::string Version() { return "1.4.0-dev"; } +grpc::string Version() { return "1.4.0-pre1"; } } diff --git a/src/csharp/Grpc.Core/Version.csproj.include b/src/csharp/Grpc.Core/Version.csproj.include index 8388bfd9cc..8a15980f0a 100755 --- a/src/csharp/Grpc.Core/Version.csproj.include +++ b/src/csharp/Grpc.Core/Version.csproj.include @@ -1,7 +1,7 @@ - 1.4.0-dev + 1.4.0-pre1 3.3.0 diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index 2e55d9d80e..feac0736c3 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -53,6 +53,6 @@ namespace Grpc.Core /// /// Current version of gRPC C# /// - public const string CurrentVersion = "1.4.0-dev"; + public const string CurrentVersion = "1.4.0-pre1"; } } diff --git a/src/csharp/build_packages_dotnetcli.bat b/src/csharp/build_packages_dotnetcli.bat index aa8a8d3b17..cb4ff60d55 100755 --- a/src/csharp/build_packages_dotnetcli.bat +++ b/src/csharp/build_packages_dotnetcli.bat @@ -28,7 +28,7 @@ @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. @rem Current package versions -set VERSION=1.4.0-dev +set VERSION=1.4.0-pre1 @rem Adjust the location of nuget.exe set NUGET=C:\nuget\nuget.exe diff --git a/src/csharp/build_packages_dotnetcli.sh b/src/csharp/build_packages_dotnetcli.sh index d33923845c..f3dc843567 100755 --- a/src/csharp/build_packages_dotnetcli.sh +++ b/src/csharp/build_packages_dotnetcli.sh @@ -54,7 +54,7 @@ dotnet pack --configuration Release Grpc.Auth --output ../../../artifacts dotnet pack --configuration Release Grpc.HealthCheck --output ../../../artifacts dotnet pack --configuration Release Grpc.Reflection --output ../../../artifacts -nuget pack Grpc.nuspec -Version "1.4.0-dev" -OutputDirectory ../../artifacts -nuget pack Grpc.Tools.nuspec -Version "1.4.0-dev" -OutputDirectory ../../artifacts +nuget pack Grpc.nuspec -Version "1.4.0-pre1" -OutputDirectory ../../artifacts +nuget pack Grpc.Tools.nuspec -Version "1.4.0-pre1" -OutputDirectory ../../artifacts (cd ../../artifacts && zip csharp_nugets_dotnetcli.zip *.nupkg) diff --git a/src/node/health_check/package.json b/src/node/health_check/package.json index 37c9b7a54f..238547c177 100644 --- a/src/node/health_check/package.json +++ b/src/node/health_check/package.json @@ -1,6 +1,6 @@ { "name": "grpc-health-check", - "version": "1.4.0-dev", + "version": "1.4.0-pre1", "author": "Google Inc.", "description": "Health check service for use with gRPC", "repository": { @@ -15,7 +15,7 @@ } ], "dependencies": { - "grpc": "^1.4.0-dev", + "grpc": "^1.4.0-pre1", "lodash": "^3.9.3", "google-protobuf": "^3.0.0" }, diff --git a/src/node/tools/package.json b/src/node/tools/package.json index a81aa87f4b..f4f72a4de5 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "1.4.0-dev", + "version": "1.4.0-pre1", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "http://www.grpc.io/", diff --git a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec index 2f29058b59..09f3303654 100644 --- a/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec +++ b/src/objective-c/!ProtoCompiler-gRPCPlugin.podspec @@ -42,7 +42,7 @@ Pod::Spec.new do |s| # exclamation mark ensures that other "regular" pods will be able to find it as it'll be installed # before them. s.name = '!ProtoCompiler-gRPCPlugin' - v = '1.4.0-dev' + v = '1.4.0-pre1' s.version = v s.summary = 'The gRPC ProtoC plugin generates Objective-C files from .proto services.' s.description = <<-DESC diff --git a/src/objective-c/GRPCClient/private/version.h b/src/objective-c/GRPCClient/private/version.h index c846f4214c..25a232a722 100644 --- a/src/objective-c/GRPCClient/private/version.h +++ b/src/objective-c/GRPCClient/private/version.h @@ -38,4 +38,4 @@ // `tools/buildgen/generate_projects.sh`. -#define GRPC_OBJC_VERSION_STRING @"1.4.0-dev" +#define GRPC_OBJC_VERSION_STRING @"1.4.0-pre1" diff --git a/src/python/grpcio/grpc/_grpcio_metadata.py b/src/python/grpcio/grpc/_grpcio_metadata.py index a0cb0dd067..fcfd197632 100644 --- a/src/python/grpcio/grpc/_grpcio_metadata.py +++ b/src/python/grpcio/grpc/_grpcio_metadata.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc/_grpcio_metadata.py.template`!!! -__version__ = """1.4.0.dev0""" +__version__ = """1.4.0rc1""" diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index ea4bc7ba20..31b85e5aee 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='1.4.0.dev0' +VERSION='1.4.0rc1' diff --git a/src/python/grpcio_health_checking/grpc_version.py b/src/python/grpcio_health_checking/grpc_version.py index 26aa555e14..53d798f603 100644 --- a/src/python/grpcio_health_checking/grpc_version.py +++ b/src/python/grpcio_health_checking/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/grpc_version.py.template`!!! -VERSION='1.4.0.dev0' +VERSION='1.4.0rc1' diff --git a/src/python/grpcio_reflection/grpc_version.py b/src/python/grpcio_reflection/grpc_version.py index 978d6b4011..25ee2808c6 100644 --- a/src/python/grpcio_reflection/grpc_version.py +++ b/src/python/grpcio_reflection/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!! -VERSION='1.4.0.dev0' +VERSION='1.4.0rc1' diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py index 5f0b084884..ea9d30704a 100644 --- a/src/python/grpcio_tests/grpc_version.py +++ b/src/python/grpcio_tests/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!! -VERSION='1.4.0.dev0' +VERSION='1.4.0rc1' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index f30dff335f..103e5cbbcd 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '1.4.0.dev' + VERSION = '1.4.0.pre1' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index 1f8d4afb95..9ce13f3f82 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -29,6 +29,6 @@ module GRPC module Tools - VERSION = '1.4.0.dev' + VERSION = '1.4.0.pre1' end end -- cgit v1.2.3 From 9d56717be4fa5d0c05e42bb1137b30ef121960d8 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 26 May 2017 14:19:23 -0700 Subject: throw if server started with unbound ports --- src/csharp/Grpc.Core/Server.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 63c1d9cd00..7ba204a0b6 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -34,6 +34,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Threading.Tasks; using Grpc.Core.Internal; @@ -155,6 +156,7 @@ namespace Grpc.Core /// /// Starts the server. + /// Throws IOException if not successful. /// public void Start() { @@ -163,7 +165,8 @@ namespace Grpc.Core GrpcPreconditions.CheckState(!startRequested); GrpcPreconditions.CheckState(!shutdownRequested); startRequested = true; - + + CheckPortsBoundSuccessfully(); handle.Start(); for (int i = 0; i < requestCallTokensPerCq; i++) @@ -316,6 +319,20 @@ namespace Grpc.Core } } + /// + /// Checks that all ports have been bound successfully. + /// + private void CheckPortsBoundSuccessfully() + { + lock (myLock) + { + if (!ports.All((port) => port.BoundPort != 0)) + { + throw new IOException("Failed to bind some of ports exposed by the server."); + } + } + } + private void DisposeHandle() { var activeCallCount = activeCallCounter.Count; -- cgit v1.2.3 From 67206428a41124abcde3798fa39728064ef59ff8 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 26 May 2017 14:28:39 -0700 Subject: add StartThrowsWithUnboundPortTest --- src/csharp/Grpc.Core.Tests/ServerTest.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') diff --git a/src/csharp/Grpc.Core.Tests/ServerTest.cs b/src/csharp/Grpc.Core.Tests/ServerTest.cs index 3b51aa6330..5e95ed9ea6 100644 --- a/src/csharp/Grpc.Core.Tests/ServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ServerTest.cs @@ -32,6 +32,7 @@ #endregion using System; +using System.IO; using System.Linq; using Grpc.Core; using Grpc.Core.Internal; @@ -80,6 +81,21 @@ namespace Grpc.Core.Tests server.ShutdownAsync().Wait(); } + [Test] + public void StartThrowsWithUnboundPorts() + { + int twiceBoundPort = 9999; + Server server = new Server(new[] { new ChannelOption(ChannelOptions.SoReuseport, 0) }) + { + Ports = { + new ServerPort("localhost", twiceBoundPort, ServerCredentials.Insecure), + new ServerPort("localhost", twiceBoundPort, ServerCredentials.Insecure) + } + }; + Assert.Throws(typeof(IOException), () => server.Start()); + server.ShutdownAsync().Wait(); + } + [Test] public void CannotModifyAfterStarted() { -- cgit v1.2.3 From bc54144b2e7526defe28db98cfcf079387c44da7 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 1 Jun 2017 03:22:15 -0700 Subject: PHP: windows config.w32 fix --- config.w32 | 129 ++++++++++++++++++++++++++ src/php/ext/grpc/version.h | 2 +- templates/config.w32.template | 36 +++++++ templates/src/php/ext/grpc/version.h.template | 2 +- 4 files changed, 167 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/config.w32 b/config.w32 index 7c407e848a..c9f30d655a 100644 --- a/config.w32 +++ b/config.w32 @@ -640,4 +640,133 @@ if (PHP_GRPC != "no") { "/I"+configure_module_dirname+"\\src\\php\\ext\\grpc "+ "/I"+configure_module_dirname+"\\third_party\\boringssl\\include "+ "/I"+configure_module_dirname+"\\third_party\\zlib"); + + base_dir = get_define('BUILD_DIR'); + FSO.CreateFolder(base_dir+"\\ext"); + FSO.CreateFolder(base_dir+"\\ext\\grpc"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\boringssl"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\census"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\census\\gen"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\proto\\grpc\\lb\\v1"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\pick_first"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\round_robin"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\dns"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\dns\\c_ares"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\dns\\native"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\client_channel\\resolver\\sockaddr"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\deadline"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\http"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\http\\client"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\http\\message_compress"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\http\\server"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\load_reporting"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\max_age"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\message_size"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\filters\\workarounds"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\alpn"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\client"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\client\\insecure"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\client\\secure"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\server"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\server\\insecure"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\server\\secure"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\ext\\transport\\chttp2\\transport"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\channel"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\compression"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\debug"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\http"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\iomgr"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\json"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\profiling"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\context"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\composite"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\fake"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\google_default"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\iam"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\jwt"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\oauth2"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\plugin"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\credentials\\ssl"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\transport"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\security\\util"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\slice"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\support"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\surface"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\lib\\transport"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\plugin_registry"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\core\\tsi"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php\\ext"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\src\\php\\ext\\grpc"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\aes"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\asn1"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\base64"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bio"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bn"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bn\\asm"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\buf"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\bytestring"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\chacha"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\cipher"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\cmac"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\conf"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\curve25519"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\des"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\dh"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\digest"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\dsa"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\ec"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\ecdh"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\ecdsa"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\engine"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\err"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\evp"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\hkdf"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\hmac"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\lhash"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\md4"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\md5"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\modes"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\newhope"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\obj"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\pem"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\pkcs8"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\poly1305"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\rand"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\rc4"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\rsa"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\sha"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\stack"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\x509"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\crypto\\x509v3"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\boringssl\\ssl"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\nanopb"); + FSO.CreateFolder(base_dir+"\\ext\\grpc\\third_party\\zlib"); + _build_dirs = new Array(); + for (i = 0; i < build_dirs.length; i++) { + if (build_dirs[i].indexOf('grpc') == -1) { + _build_dirs[_build_dirs.length] = build_dirs[i]; + } + } + build_dirs = _build_dirs; + } diff --git a/src/php/ext/grpc/version.h b/src/php/ext/grpc/version.h index 993ef2de27..0d5d36d9cf 100644 --- a/src/php/ext/grpc/version.h +++ b/src/php/ext/grpc/version.h @@ -35,6 +35,6 @@ #ifndef VERSION_H #define VERSION_H -#define PHP_GRPC_VERSION "1.4.0" +#define PHP_GRPC_VERSION "1.4.0RC1" #endif /* VERSION_H */ diff --git a/templates/config.w32.template b/templates/config.w32.template index c822eae097..4edef963f2 100644 --- a/templates/config.w32.template +++ b/templates/config.w32.template @@ -28,4 +28,40 @@ "/I"+configure_module_dirname+"\\src\\php\\ext\\grpc "+ "/I"+configure_module_dirname+"\\third_party\\boringssl\\include "+ "/I"+configure_module_dirname+"\\third_party\\zlib"); + <% + dirs = {} + for lib in libs: + if lib.name in php_config_m4.get('deps', []) and lib.name != 'ares': + for source in lib.src: + tmp = source + prev = '' + while (True): + idx = tmp.find('/'); + if (idx == -1): + break + dirs[prev + '\\\\' + tmp[:idx]] = 1 + prev += ('\\\\' + tmp[:idx]); + tmp = tmp[idx+1:] + + dirs['\\\\src'] = 1; + dirs['\\\\src\\\\php'] = 1; + dirs['\\\\src\\\\php\\\\ext'] = 1; + dirs['\\\\src\\\\php\\\\ext\\\\grpc'] = 1; + dirs = dirs.keys() + dirs.sort() + %> + base_dir = get_define('BUILD_DIR'); + FSO.CreateFolder(base_dir+"\\ext"); + FSO.CreateFolder(base_dir+"\\ext\\grpc"); + % for dir in dirs: + FSO.CreateFolder(base_dir+"\\ext\\grpc${dir}"); + % endfor + _build_dirs = new Array(); + for (i = 0; i < build_dirs.length; i++) { + if (build_dirs[i].indexOf('grpc') == -1) { + _build_dirs[_build_dirs.length] = build_dirs[i]; + } + } + build_dirs = _build_dirs; + } diff --git a/templates/src/php/ext/grpc/version.h.template b/templates/src/php/ext/grpc/version.h.template index 828ea69296..10977a83c2 100644 --- a/templates/src/php/ext/grpc/version.h.template +++ b/templates/src/php/ext/grpc/version.h.template @@ -37,6 +37,6 @@ #ifndef VERSION_H #define VERSION_H - #define PHP_GRPC_VERSION "${settings.php_version.php_composer()}" + #define PHP_GRPC_VERSION "${settings.php_version.php()}" #endif /* VERSION_H */ -- cgit v1.2.3 From c4096469299bb9d417b7a3ebacea1dbfd31ed34f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 1 Jun 2017 21:56:24 +0200 Subject: improve exception message --- src/csharp/Grpc.Core/Server.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 7ba204a0b6..1fb5c62c8f 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -326,9 +326,11 @@ namespace Grpc.Core { lock (myLock) { - if (!ports.All((port) => port.BoundPort != 0)) + var unboundPort = ports.FirstOrDefault(port => port.BoundPort == 0); + if (unboundPort != null) { - throw new IOException("Failed to bind some of ports exposed by the server."); + throw new IOException( + string.Format("Failed to bind port \"{0}:{1}\"", unboundPort.Host, unboundPort.Port)); } } } -- cgit v1.2.3 From da83f0d439cbba013121bf1d5fbcd36364462c37 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 5 Jun 2017 13:46:22 -0700 Subject: Fix minor error in Node generated documentation --- src/node/src/grpc_extension.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/node/src/grpc_extension.js b/src/node/src/grpc_extension.js index 864da97314..8c374e50b3 100644 --- a/src/node/src/grpc_extension.js +++ b/src/node/src/grpc_extension.js @@ -31,6 +31,13 @@ * */ +/** + * @module + * @private + */ + +'use strict'; + var binary = require('node-pre-gyp/lib/pre-binding'); var path = require('path'); var binding_path = -- cgit v1.2.3 From 06eb057eb76d62ca6ee0987b9b2fae1befbff78a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 8 Jun 2017 18:21:09 +0200 Subject: add grpc_slice_unref to fix leaks --- src/csharp/ext/grpc_csharp_ext.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index a56113eca3..8cde8ff0c0 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -413,8 +413,14 @@ GPR_EXPORT grpc_call *GPR_CALLTYPE grpcsharp_channel_create_call( host_slice = grpc_slice_from_copied_string(host); host_slice_ptr = &host_slice; } - return grpc_channel_create_call(channel, parent_call, propagation_mask, cq, - method_slice, host_slice_ptr, deadline, NULL); + grpc_call *ret = + grpc_channel_create_call(channel, parent_call, propagation_mask, cq, + method_slice, host_slice_ptr, deadline, NULL); + grpc_slice_unref(method_slice); + if (host != NULL) { + grpc_slice_unref(host_slice); + } + return ret; } GPR_EXPORT grpc_connectivity_state GPR_CALLTYPE @@ -805,7 +811,9 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server( ops[nops].reserved = NULL; nops++; } - return grpcsharp_call_start_batch(call, ops, nops, ctx, NULL); + grpc_call_error ret = grpcsharp_call_start_batch(call, ops, nops, ctx, NULL); + grpc_slice_unref(status_details_slice); + return ret; } GPR_EXPORT grpc_call_error GPR_CALLTYPE -- cgit v1.2.3 From bf91d9bbf74c8b923d41643868adbd2105954e81 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 9 Jun 2017 13:04:28 -0700 Subject: Node: add test for reconnecting client after server restart --- src/node/test/surface_test.js | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'src') diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js index f8eaf62aaf..11577e797d 100644 --- a/src/node/test/surface_test.js +++ b/src/node/test/surface_test.js @@ -1378,3 +1378,50 @@ describe('Cancelling surface client', function() { call.cancel(); }); }); +describe('Client reconnect', function() { + var server; + var Client; + var client; + var port; + beforeEach(function() { + var test_proto = ProtoBuf.loadProtoFile(__dirname + '/echo_service.proto'); + var echo_service = test_proto.lookup('EchoService'); + Client = grpc.loadObject(echo_service); + server = new grpc.Server(); + server.addService(Client.service, { + echo: function(call, callback) { + callback(null, call.request); + } + }); + port = server.bind('localhost:0', server_insecure_creds); + client = new Client('localhost:' + port, grpc.credentials.createInsecure()); + server.start(); + }); + afterEach(function() { + server.forceShutdown(); + }); + it('should reconnect after server restart', function(done) { + client.echo({value: 'test value', value2: 3}, function(error, response) { + assert.ifError(error); + assert.deepEqual(response, {value: 'test value', value2: 3}); + server.tryShutdown(function() { + server = new grpc.Server(); + server.addService(Client.service, { + echo: function(call, callback) { + callback(null, call.request); + } + }); + server.bind('localhost:' + port, server_insecure_creds); + server.start(); + client.echo(undefined, function(error, response) { + if (error) { + console.log(error); + } + assert.ifError(error); + assert.deepEqual(response, {value: '', value2: 0}); + done(); + }); + }); + }); + }); +}); -- cgit v1.2.3