Revision 66849ce7 ml.c

View differences:

ml.c
123 123
 */
124 124
#define LAST_PKT_RECV_TIMEOUT_DEFAULT { 1, 700000 }
125 125

  
126
/*
127
 * default fraction of RECV_TIMEOUT_DEFAULT for a last packet(s) reception timeout
128
 */
129
#define LAST_PKT_RECV_TIMEOUT_FRACTION 0.7
130

  
126 131
#endif
127 132

  
128 133

  
......
1635 1640
void mlSetRecvTimeout(struct timeval timeout_value){
1636 1641

  
1637 1642
	recv_timeout = timeout_value;
1638

  
1643
#ifdef RTX
1644
	unsigned int total_usec = recv_timeout.tv_sec * 1000000 + recv_timeout.tv_usec;
1645
	total_usec = total_usec * LAST_PKT_RECV_TIMEOUT_FRACTION;
1646
	last_pkt_recv_timeout.tv_sec = total_usec / 1000000;
1647
	last_pkt_recv_timeout.tv_usec = total_usec - last_pkt_recv_timeout.tv_sec * 1000000;
1648
	fprintf(stderr,"Timeout for receiving message: %d : %d\n", recv_timeout.tv_sec, recv_timeout.tv_usec);	
1649
	fprintf(stderr,"Timeout for last pkt: %d : %d\n", last_pkt_recv_timeout.tv_sec, last_pkt_recv_timeout.tv_usec);	
1650
#endif
1639 1651
}
1640 1652

  
1641 1653
int mlGetStandardTTL(socketID_handle socketID,uint8_t *ttl){

Also available in: Unified diff