diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-08-25 17:03:17 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-08-25 17:03:17 -0400 |
commit | bc5c65f9b468d81d761174a152f762b791b491e8 (patch) | |
tree | 2aff799094d18778757e462e1370592a2e921c2e /sql/wsrep_utils.cc | |
parent | dc0f1864ae09068dee8c340e4b3a687854c3200f (diff) | |
download | mariadb-git-bc5c65f9b468d81d761174a152f762b791b491e8.tar.gz |
MDEV-6636 : Merged fixes for lp:1167368 and lp:1250805.
Diffstat (limited to 'sql/wsrep_utils.cc')
-rw-r--r-- | sql/wsrep_utils.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sql/wsrep_utils.cc b/sql/wsrep_utils.cc index 90af2fb8156..f90d65da8cf 100644 --- a/sql/wsrep_utils.cc +++ b/sql/wsrep_utils.cc @@ -373,11 +373,8 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len) unsigned int const ip_type= wsrep_check_ip(my_bind_addr_str); if (INADDR_NONE == ip_type) { - WSREP_ERROR("Networking not configured, cannot receive state transfer."); - return 0; - } - - if (INADDR_ANY != ip_type) {; + WSREP_ERROR("Node IP address not obtained from bind_address, trying alternate methods"); + } else if (INADDR_ANY != ip_type) { strncpy (buf, my_bind_addr_str, buf_len); return strlen(buf); } @@ -404,8 +401,8 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len) // try to find the address of the first one #if (TARGET_OS_LINUX == 1) - const char cmd[] = "ip addr show | grep -E '^\\s*inet' | grep -m1 global |" - " awk '{ print $2 }' | sed 's/\\/.*//'"; + const char cmd[] = "ip addr show | grep -E '^[[:space:]]*inet' | grep -m1 global |" + " awk '{ print $2 }' | sed -e 's/\\/.*//'"; #elif defined(__sun__) const char cmd[] = "/sbin/ifconfig -a | " "/usr/gnu/bin/grep -m1 -1 -E 'net[0-9]:' | tail -n 1 | awk '{ print $2 }'"; |