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

Does not run correctly on Windows #660

Closed
RC1844 opened this issue Oct 18, 2022 · 3 comments
Closed

Does not run correctly on Windows #660

RC1844 opened this issue Oct 18, 2022 · 3 comments

Comments

@RC1844
Copy link

RC1844 commented Oct 18, 2022

There is a bug in Windows, the problem is in 192fac7 commit introduced

if (ctx->s < 0) {

change the commit did not deal with the case of running under Windows

@devotip
Copy link

devotip commented Oct 20, 2022

on windows when modbus rtu is opened looking at ctx->s is incorrect because the serial handle is in
modbus_rtu_t *ctx_rtu = ctx->backend_data;
ctx_rtu->w_ser.fd

To stay on the clean side it is probably appropriate to add a backend method "checkconnected" to differentiate the handling

@devotip
Copy link

devotip commented Oct 20, 2022

Meanwhile the pull request gets accepted you can try this https://github.com/devotip/libmodbus

@RC1844
Copy link
Author

RC1844 commented Oct 21, 2022

Oh,good.Expect pull request

epsilonrt pushed a commit to epsilonrt/libmodbus that referenced this issue Jun 19, 2023
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