|
|
|
|
@ -81,11 +81,11 @@ bool CDPlusAuthenticator::authenticate(const std::string &callsign, std::map<std
|
|
|
|
|
|
|
|
|
|
while (ret == 2) {
|
|
|
|
|
unsigned int len = (buffer[1U] & 0x0FU) * 256U + buffer[0U];
|
|
|
|
|
|
|
|
|
|
printf("next len = %u\n", len);
|
|
|
|
|
// Ensure that we get exactly len - 2U bytes from the TCP stream
|
|
|
|
|
ret = client.read(buffer + 2U, len - 2U);
|
|
|
|
|
if (ret<=0) {
|
|
|
|
|
fprintf(stderr, "Short read, wanted %d, it returned %d\n", int(len-2U), ret);
|
|
|
|
|
fprintf(stderr, "Problem reading line, it returned %d\n", errno);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|