mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Currently the sftp api code is limited to sftp.c, sftpserver.c In future it can be required to add new sftp related APIs which are present in their own separate source files instead of adding their code to the already large sftp.c file. Those new hypothetical or existing (in sftpserver.c) sftp API functions present in the source files other than sftp.c will need to call certain functions present in sftp.c which are not provided in the public api as they are for internal use (by other sftp related functions) only. Some of these sftp.c functions have external linkage, some of them don't and cannot be currently accessed outside sftp.c This commit : 1. Moves such functions along with the functions they depend on from sftp.c to a new file sftp_common.c, to seperate them out from other sftp api functions. 2. Makes necessary changes to make required functions visible outside sftp_common.c 3. Uses the header file sftp_priv.h for necessary declarations (and not sftp.h) since these functions are not to be provided in the public sftp api. Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com> Reviewed-by: Sahana Prasad <sahana@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>