Skip to content

Commit

Permalink
WL#15524 Patch #2 TLS-safe upgrade of mgm socket to transporter
Browse files Browse the repository at this point in the history
Post push fix.

NdbSocket::copy method duplicated the mutex pointer, leaving two objects
referring to one mutex. Typically the source will destroy its mutex,
making it unusable for target object.

Remove copy method.

Change-Id: I2cc36128c343c7bab08d96651b12946ecd87210c
  • Loading branch information
zmur committed Aug 15, 2023
1 parent 86c868d commit 19b96f8
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions storage/ndb/include/util/NdbSocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,9 @@ class NdbSocket {
* NdbSockets should be copied using NdbSocket::transfer(), which
* invalidates the original, and transfers ownership of its ssl and
* mutex.
*
* NdbSocket::copy() should only be used when the original is going
* out of scope.
*/
static void transfer(NdbSocket & newSocket, NdbSocket & original);
static NdbSocket transfer(NdbSocket & original);
static NdbSocket copy(const NdbSocket &s) { return s; }

void init_from_new(ndb_socket_t);
void init_from_native(socket_t fd) { ndb_socket_init_from_native(s, fd); }
Expand Down

0 comments on commit 19b96f8

Please sign in to comment.