wolfssh/examples
devin-ai-integration[bot] 76e8b9f4ea
Update SFTP status callback to output once per second (#779)
* Update myStatusCb to output once per second

Modified the myStatusCb function in sftpclient.c to only output status
updates once per second by tracking the last output time and comparing
it with the current time. This reduces the frequency of status updates
while maintaining all existing functionality.

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Reset status output timer when starting new file transfer

When starting a new file transfer, reset the lastOutputTime to ensure
the first status update for the new file is shown immediately.

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Fix Zephyr build by guarding lastOutputTime with WOLFSSH_NO_TIMESTAMP

The lastOutputTime variable is only used when timestamps are enabled,
so it should be guarded by the same macro to avoid unused variable
warnings in builds where timestamps are disabled.

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Move elapsedTime declaration to function scope

Per wolfSSL coding standards, declare all variables at function scope.
Added comment explaining that modern compilers optimize variable access
regardless of declaration placement.

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Fix timeout check to use elapsed time instead of current time

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Use elapsed time in timeout error message for consistency

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Move elapsedTime inside WOLFSSH_NO_TIMESTAMP guard

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

* Move currentTime outside WOLFSSH_NO_TIMESTAMP guard

Co-Authored-By: andrew@wolfssl.com <andrew@wolfssl.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: andrew@wolfssl.com <andrew@wolfssl.com>
2025-02-26 16:54:21 -07:00
..
client RFC-4256 Keyboard-Interactive authentication 2025-02-11 14:19:52 +00:00
echoserver Add DH Group 16 and HMAC-SHA2-512 2025-02-12 07:06:51 +00:00
portfwd Add cppcheck test to GitHub actions 2025-02-05 19:49:01 +00:00
scpclient Fix SCP server side 2025-02-19 11:13:42 +00:00
sftpclient Update SFTP status callback to output once per second (#779) 2025-02-26 16:54:21 -07:00
include.am Remove Example Server 2023-12-28 12:28:16 -08:00