/** * Return true if client sync information is valid or false if not. * * @return true if valid, false if not */ public boolean isValid() { ClientSyncMetaData md = this.getClientSyncMetaData(); // TODO: validate if public key hash matches hash of public key during // profile registration command. if (md.getProfileHash() == null) { ProfileClientSync profileRequest = this.getProfileSync(); if (profileRequest == null || profileRequest.getEndpointPublicKey() == null) { return false; } } return true; }
if (!Arrays.equals(profile.getProfileHash(), toByteArray(metaData.getProfileHash()))) { LOG.debug("[{}] Profile hash mismatch. Profile resync needed", context.getEndpointKey()); if (LOG.isTraceEnabled()) { MessageEncoderDecoder.bytesToHex(profile.getProfileHash())); LOG.trace("[{}] client profile hash is {}", context.getEndpointKey(), MessageEncoderDecoder.bytesToHex(toByteArray(metaData.getProfileHash())));
request.setRequestId(other.getRequestId()); request.getClientSyncMetaData() .setProfileHash(other.getClientSyncMetaData().getProfileHash()); LOG.debug("[{}] Updated request id and profile hash", channelUuid); ClientSync diff = new ClientSync();