Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
bc5c65f9
Commit
bc5c65f9
authored
Aug 25, 2014
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-6636 : Merged fixes for lp:1167368 and lp:1250805.
parent
dc0f1864
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
sql/wsrep_utils.cc
sql/wsrep_utils.cc
+4
-7
No files found.
sql/wsrep_utils.cc
View file @
bc5c65f9
...
@@ -373,11 +373,8 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len)
...
@@ -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
);
unsigned
int
const
ip_type
=
wsrep_check_ip
(
my_bind_addr_str
);
if
(
INADDR_NONE
==
ip_type
)
{
if
(
INADDR_NONE
==
ip_type
)
{
WSREP_ERROR
(
"Networking not configured, cannot receive state transfer."
);
WSREP_ERROR
(
"Node IP address not obtained from bind_address, trying alternate methods"
);
return
0
;
}
else
if
(
INADDR_ANY
!=
ip_type
)
{
}
if
(
INADDR_ANY
!=
ip_type
)
{;
strncpy
(
buf
,
my_bind_addr_str
,
buf_len
);
strncpy
(
buf
,
my_bind_addr_str
,
buf_len
);
return
strlen
(
buf
);
return
strlen
(
buf
);
}
}
...
@@ -404,8 +401,8 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len)
...
@@ -404,8 +401,8 @@ size_t wsrep_guess_ip (char* buf, size_t buf_len)
// try to find the address of the first one
// try to find the address of the first one
#if (TARGET_OS_LINUX == 1)
#if (TARGET_OS_LINUX == 1)
const
char
cmd
[]
=
"ip addr show | grep -E '^
\\
s
*inet' | grep -m1 global |"
const
char
cmd
[]
=
"ip addr show | grep -E '^
[[:space:]]
*inet' | grep -m1 global |"
" awk '{ print $2 }' | sed 's/
\\
/.*//'"
;
" awk '{ print $2 }' | sed
-e
's/
\\
/.*//'"
;
#elif defined(__sun__)
#elif defined(__sun__)
const
char
cmd
[]
=
"/sbin/ifconfig -a | "
const
char
cmd
[]
=
"/sbin/ifconfig -a | "
"/usr/gnu/bin/grep -m1 -1 -E 'net[0-9]:' | tail -n 1 | awk '{ print $2 }'"
;
"/usr/gnu/bin/grep -m1 -1 -E 'net[0-9]:' | tail -n 1 | awk '{ print $2 }'"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment