Merge branch 'next' into next_novolk

master
Ismael Gomez 7 years ago
commit 283591a526

@ -198,13 +198,16 @@ void gtpu::run_thread()
pdu->reset(); pdu->reset();
gtpu_log->debug("Waiting for read...\n"); gtpu_log->debug("Waiting for read...\n");
int n = 0;
do{ do{
pdu->N_bytes = recv(src_fd, pdu->msg, SRSENB_MAX_BUFFER_SIZE_BYTES - SRSENB_BUFFER_HEADER_OFFSET, 0); n = recv(src_fd, pdu->msg, SRSENB_MAX_BUFFER_SIZE_BYTES - SRSENB_BUFFER_HEADER_OFFSET, 0);
}while (pdu->N_bytes == -1 && errno == EAGAIN); } while (n == -1 && errno == EAGAIN);
if (pdu->N_bytes == -1) { if (n < 0) {
gtpu_log->error("Failed to read from socket\n"); gtpu_log->error("Failed to read from socket\n");
} }
pdu->N_bytes = (uint32_t) n;
gtpu_header_t header; gtpu_header_t header;
gtpu_read_header(pdu, &header); gtpu_read_header(pdu, &header);

Loading…
Cancel
Save