Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect session id returned #423

Open
stalkerMPro opened this issue Dec 16, 2021 · 0 comments
Open

Incorrect session id returned #423

stalkerMPro opened this issue Dec 16, 2021 · 0 comments

Comments

@stalkerMPro
Copy link

stalkerMPro commented Dec 16, 2021

I think there is a bug in file tcpip.cpp EtherCard::clientTcpReq so it returns '0' as session id for tcp connection

tcp_fd = (tcp_fd + 1) & 7;
return tcp_fd;

tcp_fd initiates with value 0 and is cycled from 1 to 7, when previous tcp_fd equals 7 the next value will be
(7+1) & 7 = 0,
but must be again 1. Added 1 line before "return" and solved my problem.

tcp_fd = (tcp_fd + 1) & 7;
if(tcp_fd==0)tcp_fd=1;
return tcp_fd;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant