Revision 9a20e619

View differences:

ml.c
817 817

  
818 818
	int con_id = (long) arg;
819 819
	pmtu new_pmtusize;
820
	struct timeval timeout;
821 820

  
822 821
	debug("ML: pmtu timeout called (lcon:%d)\n",con_id);
823 822

  
......
836 835

  
837 836
	info("ML: pmtu timeout while connecting(to:%s lcon:%d status:%d size:%d trial:%d tout:%ld.%06ld)\n",conid_to_string(con_id), con_id, connectbuf[con_id]->status, connectbuf[con_id]->pmtusize, connectbuf[con_id]->trials, connectbuf[con_id]->timeout_value.tv_sec, connectbuf[con_id]->timeout_value.tv_usec);
838 837

  
839
	timeout = connectbuf[con_id]->timeout_value;
840

  
841 838
	if(connectbuf[con_id]->delay || connectbuf[con_id]->trials == MAX_TRIALS - 1) {
842
		double delay = timeout.tv_sec + timeout.tv_usec / 1000000.0;
839
		double delay = connectbuf[con_id]->timeout_value.tv_sec + connectbuf[con_id]->timeout_value.tv_usec / 1000000.0;
843 840
		delay = delay * 2;
844 841
		info("\tML: increasing pmtu timeout to %f sec\n", delay);
845
		timeout.tv_sec = floor(delay);
846
		timeout.tv_usec = fmod(delay, 1.0) * 1000000.0;
842
		connectbuf[con_id]->timeout_value.tv_sec = floor(delay);
843
		connectbuf[con_id]->timeout_value.tv_usec = fmod(delay, 1.0) * 1000000.0;
847 844
		if(connectbuf[con_id]->delay) {
848 845
			connectbuf[con_id]->delay = false;
849 846
			reschedule_conn_msg(con_id);

Also available in: Unified diff