aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Weiß <[email protected]>2011-07-13 15:49:04 +0200
committerHolger Weiß <[email protected]>2011-07-13 15:49:04 +0200
commit32228c665506b1d84e0758c81fcb9ff3d8f8bef4 (patch)
treec9d15e3311d2c26679d8a35fefdf00879fdd7776
parent07936436b8a8b18b80451a09e040283ebecbd43b (diff)
downloadotp-32228c665506b1d84e0758c81fcb9ff3d8f8bef4.tar.gz
otp-32228c665506b1d84e0758c81fcb9ff3d8f8bef4.tar.bz2
otp-32228c665506b1d84e0758c81fcb9ff3d8f8bef4.zip
Let epmd ignore empty ERL_EPMD_ADDRESS
If the environment variable ERL_EPMD_ADDRESS is set to the empty string, empd now behaves like it does by default when ERL_EPMD_ADDRESS is unset. That is, in this case, epmd now listens on all available interfaces instead of using only the loopback interface, which happened because epmd added the loopback address to the (in this case empty) list of addresses specified via ERL_EPMD_ADDRESS. Also, epmd now ignores ERL_EPMD_ADDRESS if it contains only separator characters (comma and space). The same applies to epmd's -address option.
-rw-r--r--erts/epmd/src/epmd_srv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c
index 5debae26b6..da575affa1 100644
--- a/erts/epmd/src/epmd_srv.c
+++ b/erts/epmd/src/epmd_srv.c
@@ -102,7 +102,8 @@ void run(EpmdVars *g)
dbg_printf(g,2,"try to initiate listening port %d", g->port);
- if (g->addresses != NULL)
+ if (g->addresses != NULL && /* String contains non-separator characters if: */
+ g->addresses[strspn(g->addresses," ,")] != '\000')
{
char *tmp;
char *token;