use the return value from read

This commit is contained in:
Markus Gans 2015-08-10 00:04:25 +02:00
parent 31c9d86dba
commit 1e0f42d3b6
1 changed files with 4 additions and 4 deletions

View File

@ -3390,8 +3390,8 @@ FString FTerm::getAnswerbackMsg()
fflush(stdout);
usleep(150000); // wait 150 ms
// read the answerback message
read(fileno(stdin), &temp, sizeof(temp)-1);
answerback = temp;
if ( read(fileno(stdin), &temp, sizeof(temp)-1) > 0 )
answerback = temp;
}
return answerback;
}
@ -3412,8 +3412,8 @@ FString FTerm::getSecDA()
fflush(stdout);
usleep(150000); // wait 150 ms
// read the answer
read(fileno(stdin), &temp, sizeof(temp)-1);
sec_da = temp;
if ( read(fileno(stdin), &temp, sizeof(temp)-1) > 0 )
sec_da = temp;
}
return sec_da;
}