TrustCore SDK NanoSSH API reference  version 7.0
SFTP Client Memory Management Functions

Functions

MOC_EXTERN sbyte4 SSHC_freeFilename (sbyte4 connectionInstance, ubyte **ppFreeFilename)
 Release memory used to store a filename. More...
 
MOC_EXTERN sbyte4 SSHC_freeHandle (sbyte4 connectionInstance, sftpcFileHandleDescr **pp_sftpFileHandleDescr)
 Release (free) memory used to store a file/directory descriptor handle. More...
 

Detailed Description

Function Documentation

◆ SSHC_freeFilename()

MOC_EXTERN sbyte4 SSHC_freeFilename ( sbyte4  connectionInstance,
ubyte **  ppFreeFilename 
)

This function releases the memory used to store the specified filename.

Since
1.41
Version
1.41 and later

To enable this function, the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_SSH_CLIENT__
  • __ENABLE_MOCANA_SSH_FTP_CLIENT__

sshc.h

Parameters
connectionInstanceConnection instance returned from SSHC_connect().
ppFreeFilenamePointer to address of buffer containing the NULL-terminated filename string.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.
Remarks
This function is applicable to synchronous SFTP clients.

sshc_ftp.c

◆ SSHC_freeHandle()

MOC_EXTERN sbyte4 SSHC_freeHandle ( sbyte4  connectionInstance,
sftpcFileHandleDescr **  pp_sftpFileHandleDescr 
)

This function releases (frees) memory used to store the specified file/directory descriptor handle.

Since
1.41
Version
1.41 and later

To enable this function, the following flags must be defined in moptions.h:

  • __ENABLE_MOCANA_SSH_CLIENT__
  • __ENABLE_MOCANA_SSH_FTP_CLIENT__

sshc.h

Parameters
connectionInstanceConnection instance returned from SSHC_connect().
pp_sftpFileHandleDescrPointer to address of handle descriptor structure.
Returns
OK (0) if successful; otherwise a negative number error code definition from merrors.h. To retrieve a string containing an English text error identifier corresponding to the function's returned error status, use the DISPLAY_ERROR macro.

sshc.h