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

recv.c #198

Open
VonSzarvas opened this issue Jul 3, 2019 · 4 comments
Open

recv.c #198

VonSzarvas opened this issue Jul 3, 2019 · 4 comments

Comments

@VonSzarvas
Copy link

wifi_recv command can "block forever" if tcp rx buffer empty when bytes requested.

one issue at a glance.... line 70 looks like a problem.

if(bytesReady == 0) return 0;

because in that scenario, line 79 doesn't get called !

wifi_simpletermResume();

so the debug term will appear to crash.

There may be more to this, and the same issue applies to wifi_scan.
I don't think wifi_recv should block under any circumstances. However- the "block forever" concern may just be an issue for Badge users, as simpleterm is required for all comms.

@AndyLindsay
Copy link
Contributor

Nice catch. Do you want to try the fix in demo.blockly.parallax.com?

@VonSzarvas
Copy link
Author

This is the fix thus far. Perhaps wait on demo until it's tested, as may be some other gremlin to satisfy!
Will know in a couple days.

recv.c.txt

@AndyLindsay
Copy link
Contributor

AndyLindsay commented Jul 3, 2019 via email

AndyLindsay added a commit that referenced this issue Jul 3, 2019
v1.4.139
Test correction to issue #198
@AndyLindsay
Copy link
Contributor

AndyLindsay commented Jul 3, 2019

On second thought, I'll update the Dev branch with anything that needs testing. You can get the zip with everything else current here:
https://github.com/parallaxinc/Simple-Libraries/archive/Dev.zip
Here is info on the latest commit with your version of recv.c compiled in.

@VonSzarvas VonSzarvas mentioned this issue Aug 21, 2019
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

2 participants