return;
}
- LOG4CXX_INFO(logger_, "RawMessagePtr service type" << message->service_type());
-
utils::SharedPtr<Message> outgoing_message = ConvertRawMsgToMessage(message);
if (outgoing_message) {
return;
}
- LOG4CXX_INFO(
- logger_,
- "Connection key: " << (*message)[strings::params][strings::connection_key].asUInt());
-
ApplicationSharedPtr app = application(
(*message)[strings::params][strings::connection_key].asUInt());
if (!app) {
LOG4CXX_ERROR_EXT(logger_,
"No application associated with connection key");
- (*message)[strings::params][strings::protocol_version] =
- ProtocolVersion::kV3;
- return;
+ if ((*message)[strings::msg_params].keyExists(strings::result_code) &&
+ ((*message)[strings::msg_params][strings::result_code] ==
+ NsSmartDeviceLinkRPC::V1::Result::UNSUPPORTED_VERSION)) {
+ (*message)[strings::params][strings::protocol_version] =
+ ProtocolVersion::kV1;
+ } else {
+ (*message)[strings::params][strings::protocol_version] =
+ ProtocolVersion::kV3;
+ }
} else {
- LOG4CXX_INFO(logger_,
- "Protocol version: " << app->protocol_version());
-
(*message)[strings::params][strings::protocol_version] =
app->protocol_version();
}
- (*message)[strings::params][strings::protocol_version] =
- app->protocol_version();
-
mobile_so_factory().attachSchema(*message);
LOG4CXX_INFO(
logger_,
<< output[jhs::S_PARAMS][jhs::S_FUNCTION_ID].asInt());
output[strings::params][strings::connection_key] =
message.connection_key();
+ output[strings::params][strings::protocol_version] =
+ message.protocol_version();
if (message.binary_data()) {
output[strings::params][strings::binary_data] =
*(message.binary_data());
RpcType type = RpcType(byte);
bool supported_type = IsSupported(type);
if (!supported_type) {
- LOG4CXX_INFO(g_logger, "Invalid service type RPCfromByte: "<<int32_t(byte));
+ LOG4CXX_INFO(g_logger, "Invalid service type: "<<int32_t(byte));
}
- LOG4CXX_INFO(g_logger, "Service type RPCfromByte: "<<int32_t(byte));
return supported_type ? type : kRpcTypeReserved;
}
ServiceType type = ServiceType(byte);
bool valid_type = IsValid(type);
if (!valid_type) {
- LOG4CXX_INFO(g_logger, "Invalid service type RPCfromByte: "<<int32_t(byte))
+ LOG4CXX_INFO(g_logger, "Invalid service type: "<<int32_t(byte))
}
return valid_type ? type : kInvalidServiceType;
}