···357 info!(
358 "Performing server handshake check with client {} at message version {}.{}",
359 msg.client_name(),
360- msg.api_version_major(),
361- msg.api_version_minor()
362 );
363364- if BUTTPLUG_CURRENT_API_MAJOR_VERSION < msg.api_version_major() {
365 return ButtplugHandshakeError::MessageSpecVersionMismatch(
366 BUTTPLUG_CURRENT_API_MAJOR_VERSION,
367- msg.api_version_major(),
368 )
369 .into();
370 }
···374375 // Due to programming/spec errors in prior versions of the protocol, anything before v4 expected
376 // that it would be back a matching api version of the server. The correct response is to send back whatever the
377- let output_version = if (msg.api_version_major() as u32) < 4 {
378- msg.api_version_major()
379 } else {
380 BUTTPLUG_CURRENT_API_MAJOR_VERSION
381 };
···357 info!(
358 "Performing server handshake check with client {} at message version {}.{}",
359 msg.client_name(),
360+ msg.protocol_version_major(),
361+ msg.protocol_version_minor()
362 );
363364+ if BUTTPLUG_CURRENT_API_MAJOR_VERSION < msg.protocol_version_major() {
365 return ButtplugHandshakeError::MessageSpecVersionMismatch(
366 BUTTPLUG_CURRENT_API_MAJOR_VERSION,
367+ msg.protocol_version_major(),
368 )
369 .into();
370 }
···374375 // Due to programming/spec errors in prior versions of the protocol, anything before v4 expected
376 // that it would be back a matching api version of the server. The correct response is to send back whatever the
377+ let output_version = if (msg.protocol_version_major() as u32) < 4 {
378+ msg.protocol_version_major()
379 } else {
380 BUTTPLUG_CURRENT_API_MAJOR_VERSION
381 };