From 43b4bfd02b16e78030cf5c91ae310f1d964d56fb Mon Sep 17 00:00:00 2001
From: Yuchen Zeng <zyc@google.com>
Date: Fri, 5 Aug 2016 10:47:10 -0700
Subject: [PATCH] Revert unnecessary changes

---
 examples/cpp/helloworld/greeter_async_client.cc | 8 +++-----
 examples/cpp/helloworld/greeter_client.cc       | 2 +-
 src/core/lib/iomgr/error.c                      | 4 ++--
 src/core/lib/iomgr/ev_epoll_linux.c             | 6 ++----
 third_party/protobuf                            | 2 +-
 5 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/examples/cpp/helloworld/greeter_async_client.cc b/examples/cpp/helloworld/greeter_async_client.cc
index 0cd1eecc3d..33de59fb95 100644
--- a/examples/cpp/helloworld/greeter_async_client.cc
+++ b/examples/cpp/helloworld/greeter_async_client.cc
@@ -79,19 +79,17 @@ class GreeterClient {
     // hold on to the "rpc" instance in order to get updates on the ongoing RPC.
     std::unique_ptr<ClientAsyncResponseReader<HelloReply> > rpc(
         stub_->AsyncSayHello(&context, request, &cq));
-    std::cout << "after AsyncSayHello\n";
+
     // Request that, upon completion of the RPC, "reply" be updated with the
     // server's response; "status" with the indication of whether the operation
     // was successful. Tag the request with the integer 1.
     rpc->Finish(&reply, &status, (void*)1);
-    std::cout << "after Finish\n";
     void* got_tag;
     bool ok = false;
     // Block until the next result is available in the completion queue "cq".
     // The return value of Next should always be checked. This return value
     // tells us whether there is any kind of event or the cq_ is shutting down.
     GPR_ASSERT(cq.Next(&got_tag, &ok));
-    std::cout << "after Next\n";
 
     // Verify that the result from "cq" corresponds, by its tag, our previous
     // request.
@@ -119,8 +117,8 @@ int main(int argc, char** argv) {
   // are created. This channel models a connection to an endpoint (in this case,
   // localhost at port 50051). We indicate that the channel isn't authenticated
   // (use of InsecureChannelCredentials()).
-  GreeterClient greeter(
-      grpc::CreateChannel("[::1]:50051", grpc::InsecureChannelCredentials()));
+  GreeterClient greeter(grpc::CreateChannel(
+      "localhost:50051", grpc::InsecureChannelCredentials()));
   std::string user("world");
   std::string reply = greeter.SayHello(user);  // The actual RPC call!
   std::cout << "Greeter received: " << reply << std::endl;
diff --git a/examples/cpp/helloworld/greeter_client.cc b/examples/cpp/helloworld/greeter_client.cc
index 54bc3acaa1..12209f37df 100644
--- a/examples/cpp/helloworld/greeter_client.cc
+++ b/examples/cpp/helloworld/greeter_client.cc
@@ -88,7 +88,7 @@ int main(int argc, char** argv) {
   // localhost at port 50051). We indicate that the channel isn't authenticated
   // (use of InsecureChannelCredentials()).
   GreeterClient greeter(grpc::CreateChannel(
-      "ip6-localhost:50051", grpc::InsecureChannelCredentials()));
+      "localhost:50051", grpc::InsecureChannelCredentials()));
   std::string user("world");
   std::string reply = greeter.SayHello(user);
   std::cout << "Greeter received: " << reply << std::endl;
diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c
index a70280955c..149c55663c 100644
--- a/src/core/lib/iomgr/error.c
+++ b/src/core/lib/iomgr/error.c
@@ -174,7 +174,7 @@ static bool is_special(grpc_error *err) {
 grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line,
                            const char *func) {
   if (is_special(err)) return err;
-  gpr_log(GPR_ERROR, "%p: %" PRIdPTR " -> %" PRIdPTR " [%s:%d %s]", err,
+  gpr_log(GPR_DEBUG, "%p: %" PRIdPTR " -> %" PRIdPTR " [%s:%d %s]", err,
           err->refs.count, err->refs.count + 1, file, line, func);
   gpr_ref(&err->refs);
   return err;
@@ -200,7 +200,7 @@ static void error_destroy(grpc_error *err) {
 void grpc_error_unref(grpc_error *err, const char *file, int line,
                       const char *func) {
   if (is_special(err)) return;
-  gpr_log(GPR_ERROR, "%p: %" PRIdPTR " -> %" PRIdPTR " [%s:%d %s]", err,
+  gpr_log(GPR_DEBUG, "%p: %" PRIdPTR " -> %" PRIdPTR " [%s:%d %s]", err,
           err->refs.count, err->refs.count - 1, file, line, func);
   if (gpr_unref(&err->refs)) {
     error_destroy(err);
diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c
index 143facd260..6a63c4d1d1 100644
--- a/src/core/lib/iomgr/ev_epoll_linux.c
+++ b/src/core/lib/iomgr/ev_epoll_linux.c
@@ -911,8 +911,8 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd,
   REF_BY(fd, 1, reason);
 
   /* Remove the fd from the polling island:
+     - Get a lock on the latest polling island (i.e the last island in the
        linked list pointed by fd->polling_island). This is the island that
-       - Get a lock on the latest polling island (i.e the last island in the
        would actually contain the fd
      - Remove the fd from the latest polling island
      - Unlock the latest polling island
@@ -927,8 +927,7 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd,
     fd->polling_island = NULL;
   }
 
-  grpc_exec_ctx_sched(exec_ctx, fd->on_done_closure, GRPC_ERROR_REF(error),
-                      NULL);
+  grpc_exec_ctx_sched(exec_ctx, fd->on_done_closure, error, NULL);
 
   gpr_mu_unlock(&fd->mu);
   UNREF_BY(fd, 2, reason); /* Drop the reference */
@@ -940,7 +939,6 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd,
     PI_UNREF(exec_ctx, unref_pi, "fd_orphan");
   }
   GRPC_LOG_IF_ERROR("fd_orphan", GRPC_ERROR_REF(error));
-  GRPC_ERROR_UNREF(error);
 }
 
 static grpc_error *fd_shutdown_error(bool shutdown) {
diff --git a/third_party/protobuf b/third_party/protobuf
index d4d13a4349..bdeb215cab 160000
--- a/third_party/protobuf
+++ b/third_party/protobuf
@@ -1 +1 @@
-Subproject commit d4d13a4349e4e59d67f311185ddcc1890d956d7a
+Subproject commit bdeb215cab2985195325fcd5e70c3fa751f46e0f
-- 
GitLab