Move back to swapping pointers

This commit is contained in:
Eric Tang
2017-08-08 10:54:56 -07:00
parent 079988146d
commit 406ea3782d
2 changed files with 9 additions and 6 deletions

View File

@@ -95,9 +95,13 @@ void TestConfig(void)
void applyConfig(void)
{
uint8_t *temp;
TestConfig(); // This line will be removed. TestConfig will be called by Agent separately.
memcpy(&UserConfigBuffer, &StagingUserConfigBuffer, USER_CONFIG_SIZE);
ParserRunDry = false;
temp = UserConfigBuffer.buffer;
UserConfigBuffer.buffer = StagingUserConfigBuffer.buffer;
StagingUserConfigBuffer.buffer = temp;
UserConfigBuffer.offset = 0;
GenericHidOutBuffer[0] = ParseConfig(&UserConfigBuffer);
GenericHidOutBuffer[1] = UserConfigBuffer.offset;