- Fix a bug in sctp_calc_rwnd() which resulted in wrong rwnd predictions.

- Fix a signedness problem that shows up in some 64 bit platforms (macos).

MFC after:	1 week
This commit is contained in:
Randall Stewart 2007-11-10 00:47:14 +00:00
parent 284096f773
commit 81aca91ab6
2 changed files with 3 additions and 3 deletions

View File

@ -170,8 +170,8 @@ sctp_calc_rwnd(struct sctp_tcb *stcb, struct sctp_association *asoc)
*/
result = 1;
}
if (asoc->my_rwnd &&
(asoc->my_rwnd < stcb->sctp_ep->sctp_ep.sctp_sws_receiver)) {
if (result &&
(result < stcb->sctp_ep->sctp_ep.sctp_sws_receiver)) {
/* SWS engaged, tell peer none left */
result = 1;
}

View File

@ -4934,7 +4934,7 @@ sctp_sorecvmsg(struct socket *so,
int out_flags = 0, in_flags = 0;
int block_allowed = 1;
uint32_t freed_so_far = 0;
int copied_so_far = 0;
uint32_t copied_so_far = 0;
int in_eeor_mode = 0;
int no_rcv_needed = 0;
uint32_t rwnd_req = 0;