Replies: 4 comments
-
@d3x0r Thanks for your report. Would you mind making a PR out of this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
to include or exclude the flush? |
Beta Was this translation helpful? Give feedback.
0 replies
-
The title says there is unused code, so I suppose to exclude. A PR would allow the tests to run and team members to review. If there no definite action at this time, we can move this to |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hmm I don't see a back reference automatic... so PR #1345 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Was going through the code and found some unused code.
https://github.com/libssh2/libssh2/blob/master/src/channel.c#L2009-L2017
if
channel->extData2_state == libssh2_NB_state_idle
when the function starts, then the first if changes it tolibssh2_NB_state_created
and then for the next if the state won't be idle anymore, and the second if won't run. If it's not idle, then nothing happens, and the state is reset to idle.Really this is the only function that uses
extData2_state
So the function becomes just
and
extData2_state
can be removed from the channel structure.Or - maybe if there is really a flush still desired, maybe the second if should use
channel->extData2_state == libssh2_NB_state_created
instead ofchannel->extData2_state == libssh2_NB_state_idle
.Beta Was this translation helpful? Give feedback.
All reactions