transceiver: Fix command build warning

Place conditional brackets on handover table reset. Reset table
only on successful start or restart.

Change-Id: I74032b49785bd68835a0a68cb0f14cdaab4fcd26
This commit is contained in:
Tom Tsou 2016-10-19 15:26:04 -07:00 committed by Tom Tsou
parent 43242efc85
commit 365bc38bee
1 changed files with 3 additions and 2 deletions

View File

@ -744,14 +744,15 @@ void Transceiver::driveControl(size_t chan)
sprintf(response,"RSP POWEROFF 0");
}
else if (strcmp(command,"POWERON")==0) {
if (!start())
if (!start()) {
sprintf(response,"RSP POWERON 1");
else
} else {
sprintf(response,"RSP POWERON 0");
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++)
mHandover[i][j] = false;
}
}
}
else if (strcmp(command,"HANDOVER")==0){
int ts=0,ss=0;