fix: linuxcncrsh: return PROGRAM NONE if no program is open (2.8)#2153
Merged
andypugh merged 1 commit intoLinuxCNC:2.8from Nov 23, 2022
Merged
fix: linuxcncrsh: return PROGRAM NONE if no program is open (2.8)#2153andypugh merged 1 commit intoLinuxCNC:2.8from
andypugh merged 1 commit intoLinuxCNC:2.8from
Conversation
return PROGRAM NONE if no program is open
Collaborator
|
Thanks for this, now pushed to 2.8, 2.9 and master (2.10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
a duplicate of this PR: #2152 .... targetted to 2.8 as suggested by @andypugh
I forked the 2.8 branch of
LinuxCNC/linuxcncand applied the same change.I found the following bug while using
linuxcncrsh.get programdoes not returnnoneif no program is open.The behavior of
get programwhen no program is open is documented as:see:
linuxcnc/src/emc/usr_intf/emcrsh.cc
Line 319 in 8afe6e4
It appears this bug has been present since
emcrsh.ccwas first committed:linuxcnc/src/emc/usr_intf/emcrsh.cc
Line 4140 in bf277a0
steps to reproduce:
linuxcncrshtelnet <SOME_IP> 5007get programget programget programget programget estop(or any otherget *commandget machine, getget joint_pos, etc)get programget programget programget programexpected behavior:
for all commands above:
get program->PROGRAM NONE\r\nget estop->ESTOP ON\r\nactual behavior:
get program-->\r\nget program-->\r\n\r\nget program-->\r\n\r\n\r\nget program-->\r\n\r\n\r\nget estop-->ESTOP ON\r\nget program-->ESTOP ON\r\n\r\nget program-->ESTOP ON\r\n\r\n\r\nget program-->ESTOP ON\r\n\r\n\r\n\r\nget program-->ESTOP ON\r\n\r\n\r\n\r\n\r\nget programreturns the previously executedget *command (except at the start, when no othergethas been run)get programis run while no program is open, an additional new line is added to the responseIn #2152, @andypugh said: