SSH driver bug fix on buffer size #142
Merged
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.
Hi there, Leandro!
At LNLS, we have a new project under development using deltatau with Pmac IOC. We noticed a problem when instantiating a dynamic variable with the .substitutions file (pmacVariableWrite.template).
To instantiate multiple variables, the
pmacCommandStore::buildCommandStringfunction generates an addition of 40 variables in a 1024 char. However, theSSHDriver::writefunction needs to perform an ECHO and the static buffer size is 512 char. If the buffer size passed toSSHDriver::writeis greater than 512 char, an error is accused in the function (no match), generating a false error of connection loss and reconnection with the deltatau controller.To solve the problem, I changed the buffer size to 2048 char, following the same pattern as the rest of the sshDriver.cpp code.
I am attaching the replacements file for you to reproduce the same problem with the current version.
mgn-b-pb08.substitutions.txt