You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by dm...@apache.org on 2015/03/05 19:24:30 UTC

mesos git commit: Replace hardcoded constants from libprocess with INADDR_ANY and INADDR_LOOPBACK.

Repository: mesos
Updated Branches:
  refs/heads/master 9a4f7434d -> dda6cb29f


Replace hardcoded constants from libprocess with INADDR_ANY and INADDR_LOOPBACK.

Review: https://reviews.apache.org/r/31724


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/dda6cb29
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/dda6cb29
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/dda6cb29

Branch: refs/heads/master
Commit: dda6cb29fb89770c1ec527410750bc0c08d8af53
Parents: 9a4f743
Author: Evelina Dumitrescu <ev...@gmail.com>
Authored: Thu Mar 5 10:08:01 2015 -0800
Committer: Dominic Hamon <dm...@twitter.com>
Committed: Thu Mar 5 10:09:10 2015 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/src/process.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/dda6cb29/3rdparty/libprocess/src/process.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/process.cpp b/3rdparty/libprocess/src/process.cpp
index 6f9a0d2..671aff6 100644
--- a/3rdparty/libprocess/src/process.cpp
+++ b/3rdparty/libprocess/src/process.cpp
@@ -874,7 +874,8 @@ void initialize(const string& delegate)
   // actually have a valid external ip address. Note that we need only
   // one ip address, so that other processes can send and receive and
   // don't get confused as to whom they are sending to.
-  if (__address__.ip == 0 || __address__.ip == 2130706433) {
+  if (__address__.ip == htonl(INADDR_ANY) ||
+      __address__.ip == htonl(INADDR_LOOPBACK)) {
     char hostname[512];
 
     if (gethostname(hostname, sizeof(hostname)) < 0) {