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

Fixed unset wiced_result for tcp clients on socket_send #773

Closed
wants to merge 1 commit into from

Conversation

@tlangmo
Copy link
Contributor

commented Dec 17, 2015

I noticed that on the Photon platform, TCPClient::write does ALWAYS return -7009 if it is a client connection of a TCPServer. Looking at the code, I see that the socket return code is written to the wrong variable, result instead of wiced_result. This is leads to a constant return value of WICED_TCPIP_INVALID_SOCKET (7009) which subsequently gets negated.

Casting the int return code to wiced_result_t and assigning it to wiced_result is the fix.

@m-mcgowan m-mcgowan added this to the 0.4.9 milestone Jan 13, 2016

m-mcgowan added a commit that referenced this pull request Jan 13, 2016
@m-mcgowan

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2016

Thanks for the heads up about this oversight. 👍 I changed the return type of tcp_server_client_t::write so that we avoid the cast.

@m-mcgowan m-mcgowan closed this Jan 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.