- Notifications
You must be signed in to change notification settings - Fork26
switched to modbus_new_tcp_pi#50
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
48274bc toec48accComparev-zhuravlev commentedSep 24, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
DNS is now supported in both TCP and RTU over TCP modes. Latter is supported thanks to@myssta version of the patch I merged into v-zhuravlev/libmodbus. |
| TCP port may also be redefined (from Modbus default 502) if needed:`enc://192.168.1.1:5000` | ||
| Note: DNS names are not supported for TCP and RTU over TCP | ||
| TCP port may also be redefined (from Modbus default 502) if needed:`enc://192.168.1.1:5000` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Trailing spaces. :)
| charhost[100]; | ||
| intport=MODBUS_TCP_DEFAULT_PORT; | ||
| charport_str[10]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
sprintf()ingMAX_INT can overflow this buffer.
| { | ||
| *lock_required_out=1; | ||
| con_string+=strlen("enc://"); | ||
| sscanf(con_string,"%99[^:]:%99d[^\n]",host,&port); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Why don't we just readport as%s?
would implement#48 when done