fieldrndservices / libssh2-labview

A LabVIEW library for SSH client support via libssh2
Apache License 2.0
22 stars 2 forks source link

Correct examples, when saving binaries files from LabVIEW to not add size at beginning of file #35

Closed ngblume closed 2 years ago

ngblume commented 3 years ago

When for example the example "Simple SCP File Download.vi" is used, LabVIEW adds the size of the saved binary file at the beginning of that file making it not identical to what was on the SSH server before. I don't know why this is default true in LabVIEW, but for the purpose of transfering a file via SCP and having the identical file after transfer, this needs to be false.

image

Example: image

volks73 commented 3 years ago

Interesting. I just checked the source code and there is a boolean False constant wired to the Write to Binary VI in all examples for SCP and SFTP downloading. But, I just checked the example from the latest version (v1.1.1.25) installed via VIPM and it is missing. I tried a fresh install of the package, and the example is missing the False constant, too. I must've added it but it did not get into the latest release. Looking at the file history, I must have added the constants to the example back in January after the latest release and it has sat unreleased for a while.

I thought there might be the possibility that the constant was getting stripped/removed from the VI during the package build process because I thought LabVIEW 2009 might no support the function (it has been an issue in the past), but after testing the package under LabVIEW 2009, this is not the case.

I have been bitten by the True default before, too. It is very aggravating. So, I am sorry this caused problems for you.

I will look into creating a new release shortly.

ngblume commented 3 years ago

Sounds great! Always good to know, that one is not the only one fighting with certain "interesting" default choices of NI...

volks73 commented 2 years ago

I have just created a new release, v1.2.0, which should includes the needed false constant in the examples and should resolve this issue.

Note, it will take some time for the new release to be available on VIPM.io.