bug in R13B01 inet:setopt(high_watermark)
Feng Yu
mryufeng@REDACTED
Mon Aug 3 12:05:02 CEST 2009
Hi,
Maybe a bug in R13B01 erts/emulator/drivers/common/inet_drv.c:L 4674 found:
case INET_LOPT_TCP_HIWTRMRK:
if (desc->stype == SOCK_STREAM) {
tcp_descriptor* tdesc = (tcp_descriptor*) desc;
fprintf(stderr, "hiwtrmrk:%d\n", ival);
if (ival < 0) ival = 0;
else if (ival > INET_MAX_BUFFER*2) ival = INET_MAX_BUFFER*2;
if (tdesc->low > ival)
tdesc->low = ival;
tdesc->high = ival;
}
continue;
case INET_LOPT_TCP_LOWTRMRK:
if (desc->stype == SOCK_STREAM) {
tcp_descriptor* tdesc = (tcp_descriptor*) desc;
if (ival < 0) ival = 0;
else if (ival > INET_MAX_BUFFER) ival = INET_MAX_BUFFER;
if (tdesc->high < ival)
tdesc->high = ival;
/*L4674*/ tdesc->high = ival; /*it should be tdesc->low = ival; ????*/
}
continue;
right?
More information about the erlang-questions
mailing list