Closed GoogleCodeExporter closed 9 years ago
Can you write up a patch to fix this and send it to the developers mailing
list? http://arduino.cc/mailman/listinfo/developers_arduino.cc
Original comment by dmel...@gmail.com
on 27 Mar 2009 at 3:37
I tried registering for the developers mailing list yesterday but still have
not received the confirmation email.
Maybe there's something wrong with the mailman system?
The only change is a simple test to reset _srcport if it's over 64511 (note
that I made a type in the original post
and indicated 54511).
In Client.cpp:
Original connect() function:
***************************************************
uint8_t Client::connect() {
_sock = 255;
for (int i = 0; i < MAX_SOCK_NUM; i++) {
if (getSn_SR(i) == SOCK_CLOSED) {
_sock = i;
}
}
if (_sock == 255)
return 0;
_srcport++;
socket(_sock, Sn_MR_TCP, 1024 + _srcport, 0);
if (!::connect(_sock, _ip, _port))
return 0;
while (status() != SOCK_ESTABLISHED) {
if (status() == SOCK_CLOSED)
return 0;
}
return 1;
}
***************************************************
Revised connect() function:
***************************************************
uint8_t Client::connect() {
_sock = 255;
for (int i = 0; i < MAX_SOCK_NUM; i++) {
if (getSn_SR(i) == SOCK_CLOSED) {
_sock = i;
}
}
if (_sock == 255)
return 0;
_srcport++;
if (_srcport > 64511)
_srcport = 0;
socket(_sock, Sn_MR_TCP, 1024 + _srcport, 0);
if (!::connect(_sock, _ip, _port))
return 0;
while (status() != SOCK_ESTABLISHED) {
if (status() == SOCK_CLOSED)
return 0;
}
return 1;
}
***************************************************
The only change being the addition of:
***************************************************
if (_srcport > 64511)
_srcport = 0;
***************************************************
Original comment by etrace...@gmail.com
on 28 Mar 2009 at 4:38
This should be fixed in 0016.
Original comment by dmel...@gmail.com
on 5 Jun 2009 at 12:34
Original issue reported on code.google.com by
etrace...@gmail.com
on 25 Mar 2009 at 12:08