pivotal-jbarrett commented on code in PR #962:
URL: https://github.com/apache/geode-native/pull/962#discussion_r861186288


##########
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:
   You should take a look at that value. I am pretty sure that is always 3. Not 
sure what the point is.



-- 
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