[DCCP] ccid3: return value in ccid3_hc_rx_calc_first_li
authorIan McDonald <ian.mcdonald@jandi.co.nz>
Tue, 12 Dec 2006 02:47:59 +0000 (00:47 -0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 14 Dec 2006 00:48:24 +0000 (16:48 -0800)
In a recent patch we introduced invalid return codes which will result in the
opposite of what is intended (i.e. send more packets in face of peculiar
network conditions).

This fixes it by returning ~0 which means not calculated as per
dccp_li_hist_calc_i_mean.

Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
net/dccp/ccids/ccid3.c

index fa6b75372ed701d114ea7f9b9c8596ee5f34f97e..40402c59506a32b5b5c12d3bc7ca53730d087740 100644 (file)
@@ -845,8 +845,8 @@ found:
         * Find some p such that f(p) = fval; return 1/p [RFC 3448, 6.3.1].
         */
        if (rtt == 0) {                 /* would result in divide-by-zero */
-               DCCP_WARN("RTT==0, returning 1/p = 1\n");
-               return 1000000;
+               DCCP_WARN("RTT==0\n");
+               return ~0;
        }
 
        dccp_timestamp(sk, &tstamp);
@@ -858,7 +858,7 @@ found:
                DCCP_WARN("X_recv==0\n");
                if ((x_recv = hcrx->ccid3hcrx_x_recv) == 0) {
                        DCCP_BUG("stored value of X_recv is zero");
-                       return 1000000;
+                       return ~0;
                }
        }