All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@mandriva.com>
To: dccp@vger.kernel.org
Subject: [PATCH 1/1][DCCP] ccid3: return value in ccid3_hc_rx_calc_first_li
Date: Tue, 12 Dec 2006 22:47:56 +0000	[thread overview]
Message-ID: <20061212224756.GA6888@mandriva.com> (raw)

David,

	Please consider pulling from:

master.kernel.org:/pub/scm/linux/kernel/git/acme/net-2.6.git

Thanks a lot,

- Arnaldo

-------------------------------- 8< -------------------------------

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 |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index fa6b753..40402c5 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -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;
 		}
 	}
 
-- 
1.4.2.1.g3d5c



                 reply	other threads:[~2006-12-12 22:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061212224756.GA6888@mandriva.com \
    --to=acme@mandriva.com \
    --cc=dccp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.