Browse Source

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

Adam Ierymenko 9 years ago
parent
commit
683254a0db
1 changed files with 3 additions and 4 deletions
  1. 3 4
      controller/SqliteNetworkController.cpp

+ 3 - 4
controller/SqliteNetworkController.cpp

@@ -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
 	// Append legacy network config data for older devices
 	if (metaData.protocolVersion < 6) {
 	if (metaData.protocolVersion < 6) {
+		if (!legacy.sign(signingId,now))
+			return NETCONF_QUERY_INTERNAL_SERVER_ERROR;
 		std::string legacyStr(legacy.toString());
 		std::string legacyStr(legacy.toString());
 		netconf.append((const void *)legacyStr.data(),(unsigned int)legacyStr.length());
 		netconf.append((const void *)legacyStr.data(),(unsigned int)legacyStr.length());
 	}
 	}
+
 	netconf.append((uint8_t)0);
 	netconf.append((uint8_t)0);
 
 
 	// Append new format data for newer devices
 	// Append new format data for newer devices