Commit e156079e authored by knopp's avatar knopp

timeout for UDP recvfrom

parent af9c77d0
......@@ -229,7 +229,7 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t
*packet_type = packet_header->sub_type;
printf("CC_id %d : frame %d, subframe %d\n",eNB->CC_id,*frame,*subframe);
// printf("CC_id %d : frame %d, subframe %d\n",eNB->CC_id,*frame,*subframe);
if (*packet_type == IF4p5_PDLFFT) {
*symbol_number = ((packet_header->frame_status)>>26)&0x000f;
......
......@@ -160,6 +160,7 @@ int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestam
if (bytes_received ==-1) {
eth->num_rx_errors++;
if (errno == EAGAIN) {
/*
again_cnt++;
usleep(10);
if (again_cnt == 1000) {
......@@ -169,6 +170,9 @@ int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestam
printf("AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN \n");
goto again;
}
*/
printf("Lost IF4p5 connection with %s\n", inet_ntoa(eth->dest_addr.sin_addr));
exit(-1);
} else if (errno == EWOULDBLOCK) {
block_cnt++;
usleep(10);
......
......@@ -96,6 +96,7 @@ int trx_eth_start(openair0_device *device) {
} else {
if(eth_get_dev_conf_udp(device)!=0) return -1;
}
if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1;
} else if (eth->flags == ETH_RAW_IF5_MOBIPASS) {
printf("Setting ETHERNET to RAW_IF5_MODE\n");
if (eth_socket_init_raw(device)!=0) return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment