Don't bother signing if we are not using the legacy netconf.

This commit is contained in:
Adam Ierymenko 2016-06-07 11:17:38 -07:00
parent 2885aea65c
commit 683254a0db

View File

@ -2130,15 +2130,14 @@ NetworkController::ResultCode SqliteNetworkController::_doNetworkConfigRequest(c
}
}
if (!legacy.sign(signingId,now)) {
return NETCONF_QUERY_INTERNAL_SERVER_ERROR;
}
// Append legacy network config data for older devices
if (metaData.protocolVersion < 6) {
if (!legacy.sign(signingId,now))
return NETCONF_QUERY_INTERNAL_SERVER_ERROR;
std::string legacyStr(legacy.toString());
netconf.append((const void *)legacyStr.data(),(unsigned int)legacyStr.length());
}
netconf.append((uint8_t)0);
// Append new format data for newer devices