aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nnoble@google.com>2015-03-18 16:27:43 -0700
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-03-19 04:21:22 +0100
commitcfd6073a66fda3db150998ef40dbbc76c198c02e (patch)
tree219bdb26ca59d84996c4fd29e2be2d467057f080 /examples
parent6cf02edae146694e6e9378e0b6fb635439b9c140 (diff)
Various Windows fixes.
-) using dupenv_s instead of getenv_s and calling strdup ourselves. -) few impossible-to-obtain if checks. -) various signed/unsigned casting. -) using time_t instead of time32_t -) checking output of FormatMessage for failures. -) don't redefine _WIN32_WINNT without undefining it first. -) fixed msvc's interlocked casting. -) renamed AddPort to AddListeningPort. -) added protobuf's third_party includes to search path. -) added a missing definition for inet_ntop in mingw32. -) removed useless declarations.
Diffstat (limited to 'examples')
-rw-r--r--examples/pubsub/publisher_test.cc2
-rw-r--r--examples/pubsub/subscriber_test.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/pubsub/publisher_test.cc b/examples/pubsub/publisher_test.cc
index f9b6bb3418..62442c7384 100644
--- a/examples/pubsub/publisher_test.cc
+++ b/examples/pubsub/publisher_test.cc
@@ -107,7 +107,7 @@ class PublisherTest : public ::testing::Test {
int port = grpc_pick_unused_port_or_die();
server_address_ << "localhost:" << port;
ServerBuilder builder;
- builder.AddPort(server_address_.str(), grpc::InsecureServerCredentials());
+ builder.AddListeningPort(server_address_.str(), grpc::InsecureServerCredentials());
builder.RegisterService(&service_);
server_ = builder.BuildAndStart();
diff --git a/examples/pubsub/subscriber_test.cc b/examples/pubsub/subscriber_test.cc
index 2d606336ad..b8dd1f9486 100644
--- a/examples/pubsub/subscriber_test.cc
+++ b/examples/pubsub/subscriber_test.cc
@@ -105,7 +105,7 @@ class SubscriberTest : public ::testing::Test {
int port = grpc_pick_unused_port_or_die();
server_address_ << "localhost:" << port;
ServerBuilder builder;
- builder.AddPort(server_address_.str(), grpc::InsecureServerCredentials());
+ builder.AddListeningPort(server_address_.str(), grpc::InsecureServerCredentials());
builder.RegisterService(&service_);
server_ = builder.BuildAndStart();