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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
80dd983b
Commit
80dd983b
authored
Jan 10, 2005
by
stewart@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Incorporate Jonas Orland's suggestions.
parent
833f096d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
ndb/src/common/util/SocketServer.cpp
ndb/src/common/util/SocketServer.cpp
+13
-2
No files found.
ndb/src/common/util/SocketServer.cpp
View file @
80dd983b
...
@@ -119,8 +119,19 @@ SocketServer::setup(SocketServer::Service * service,
...
@@ -119,8 +119,19 @@ SocketServer::setup(SocketServer::Service * service,
NDB_CLOSE_SOCKET
(
sock
);
NDB_CLOSE_SOCKET
(
sock
);
DBUG_RETURN
(
false
);
DBUG_RETURN
(
false
);
}
}
socklen_t
sock_len
=
sizeof
(
servaddr
);
getsockname
(
sock
,(
struct
sockaddr
*
)
&
servaddr
,
&
sock_len
);
/* Get the port we bound to */
SOCKET_SIZE_TYPE
sock_len
=
sizeof
(
servaddr
);
if
(
getsockname
(
sock
,(
struct
sockaddr
*
)
&
servaddr
,
&
sock_len
)
<
0
)
{
char
msg
[
100
];
if
(
!
strerror_r
(
errno
,
msg
,
sizeof
(
msg
)))
strcpy
(
msg
,
"Unknown"
);
ndbout_c
(
"An error occurred while trying to find out what"
" port we bound to. Error: %s"
,
msg
);
NDB_CLOSE_SOCKET
(
sock
);
DBUG_RETURN
(
false
);
}
DBUG_PRINT
(
"info"
,(
"bound to %u"
,
ntohs
(
servaddr
.
sin_port
)));
DBUG_PRINT
(
"info"
,(
"bound to %u"
,
ntohs
(
servaddr
.
sin_port
)));
if
(
listen
(
sock
,
m_maxSessions
)
==
-
1
){
if
(
listen
(
sock
,
m_maxSessions
)
==
-
1
){
DBUG_PRINT
(
"error"
,(
"listen() - %d - %s"
,
DBUG_PRINT
(
"error"
,(
"listen() - %d - %s"
,
...
...
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