+
+ /* Major versions must be the same */
+ if (reply.major != be32toh(msg.major)) {
+ DBG("Incompatible major versions, deleting session");
+ relay_delete_session(cmd, streams_ht);
+ ret = 0;
+ goto end;
+ }
+
+ cmd->session->major = reply.major;
+ /* We adapt to the lowest compatible version */
+ if (reply.minor <= be32toh(msg.minor)) {
+ cmd->session->minor = reply.minor;
+ } else {
+ cmd->session->minor = be32toh(msg.minor);
+ }
+
+ DBG("Version check done using protocol %u.%u", cmd->session->major,
+ cmd->session->minor);