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
dc5d31cb
Commit
dc5d31cb
authored
Feb 14, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
connect_ndb_mgmd stilled some more mem leaks
parent
72f02926
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
ndb/src/common/transporter/TransporterRegistry.cpp
ndb/src/common/transporter/TransporterRegistry.cpp
+18
-6
No files found.
ndb/src/common/transporter/TransporterRegistry.cpp
View file @
dc5d31cb
...
@@ -1486,10 +1486,13 @@ TransporterRegistry::get_transporter(NodeId nodeId) {
...
@@ -1486,10 +1486,13 @@ TransporterRegistry::get_transporter(NodeId nodeId) {
NDB_SOCKET_TYPE
TransporterRegistry
::
connect_ndb_mgmd
(
SocketClient
*
sc
)
NDB_SOCKET_TYPE
TransporterRegistry
::
connect_ndb_mgmd
(
SocketClient
*
sc
)
{
{
NdbMgmHandle
h
;
NdbMgmHandle
h
=
ndb_mgm_create_handle
()
;
struct
ndb_mgm_reply
mgm_reply
;
struct
ndb_mgm_reply
mgm_reply
;
h
=
ndb_mgm_create_handle
();
if
(
h
==
NULL
)
{
return
NDB_INVALID_SOCKET
;
}
/**
/**
* Set connectstring
* Set connectstring
...
@@ -1505,7 +1508,10 @@ NDB_SOCKET_TYPE TransporterRegistry::connect_ndb_mgmd(SocketClient *sc)
...
@@ -1505,7 +1508,10 @@ NDB_SOCKET_TYPE TransporterRegistry::connect_ndb_mgmd(SocketClient *sc)
*/
*/
cs
=
(
char
*
)
malloc
(
len
*
sizeof
(
char
));
cs
=
(
char
*
)
malloc
(
len
*
sizeof
(
char
));
if
(
!
cs
)
if
(
!
cs
)
{
ndb_mgm_destroy_handle
(
&
h
);
return
NDB_INVALID_SOCKET
;
return
NDB_INVALID_SOCKET
;
}
}
}
snprintf
(
cs
,
len
,
"%s:%u"
,
sc
->
get_server_name
(),
sc
->
get_port
());
snprintf
(
cs
,
len
,
"%s:%u"
,
sc
->
get_server_name
(),
sc
->
get_port
());
ndb_mgm_set_connectstring
(
h
,
cs
);
ndb_mgm_set_connectstring
(
h
,
cs
);
...
@@ -1514,16 +1520,22 @@ NDB_SOCKET_TYPE TransporterRegistry::connect_ndb_mgmd(SocketClient *sc)
...
@@ -1514,16 +1520,22 @@ NDB_SOCKET_TYPE TransporterRegistry::connect_ndb_mgmd(SocketClient *sc)
}
}
if
(
ndb_mgm_connect
(
h
,
0
,
0
,
0
)
<
0
)
if
(
ndb_mgm_connect
(
h
,
0
,
0
,
0
)
<
0
)
{
ndb_mgm_destroy_handle
(
&
h
);
return
NDB_INVALID_SOCKET
;
return
NDB_INVALID_SOCKET
;
}
for
(
unsigned
int
i
=
0
;
i
<
m_transporter_interface
.
size
();
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
m_transporter_interface
.
size
();
i
++
)
ndb_mgm_set_connection_int_parameter
(
h
,
if
(
ndb_mgm_set_connection_int_parameter
(
h
,
get_localNodeId
(),
get_localNodeId
(),
m_transporter_interface
[
i
].
m_remote_nodeId
,
m_transporter_interface
[
i
].
m_remote_nodeId
,
CFG_CONNECTION_SERVER_PORT
,
CFG_CONNECTION_SERVER_PORT
,
m_transporter_interface
[
i
].
m_s_service_port
,
m_transporter_interface
[
i
].
m_s_service_port
,
&
mgm_reply
);
&
mgm_reply
)
<
0
)
{
ndb_mgm_destroy_handle
(
&
h
);
return
NDB_INVALID_SOCKET
;
}
return
ndb_mgm_convert_to_transporter
(
h
);
return
ndb_mgm_convert_to_transporter
(
h
);
}
}
...
...
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