pdxcodemonkey commented on code in PR #962:
URL: https://github.com/apache/geode-native/pull/962#discussion_r861365008


##########
cppcache/src/ClientProxyMembershipID.cpp:
##########
@@ -247,31 +243,26 @@ Serializable* 
ClientProxyMembershipID::readEssentialData(DataInput& input) {
 
   auto dsName = std::dynamic_pointer_cast<CacheableString>(input.readObject());
 
-  initHostAddressVector(hostAddress, length);
+  initHostAddressVector(hostAddress.data(), length);
 
-  if (vmKind != ClientProxyMembershipID::LONER_DM_TYPE) {
+  if (vmKind != kVmKindLoaner) {
     // initialize the object with the values read and some dummy values
-    initObjectVars("", hostPort, "", std::chrono::seconds::zero(), DCPORT, 0,
+    initObjectVars("", hostPort, "", std::chrono::seconds::zero(), kDcPort, 0,
                    vmKind, 0, dsName->value().c_str(), nullptr, vmViewId);
   } else {
     // initialize the object with the values read and some dummy values
-    initObjectVars("", hostPort, "", std::chrono::seconds::zero(), DCPORT, 0,
+    initObjectVars("", hostPort, "", std::chrono::seconds::zero(), kDcPort, 0,
                    vmKind, 0, dsName->value().c_str(),
                    uniqueTag->value().c_str(), vmViewId);
   }
-
-  delete[] hostAddress;
-  readAdditionalData(input);
-
-  return this;
 }
 
 void ClientProxyMembershipID::readAdditionalData(DataInput& input) {
   // Skip unused UUID (16) and weight (0);
   input.advanceCursor(17);
 }
 
-void ClientProxyMembershipID::increaseSynchCounter() { ++synch_counter; }
+void ClientProxyMembershipID::increaseSynchCounter() { ++synchCounter; }

Review Comment:
   Seriously - what the heck does this thing do??????  It starts at 2, and 
`increaseSyncCounter` is called by the ThinClientPoolDM ctor, so is there only 
ever one of these(???).  If so, it's yeah just always 3.  It gets written into 
both clientId and memberId, but I also have no idea what, if any, information 
in those things is ever unpacked on the server side. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to