aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-08-12 11:24:38 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-08-12 11:24:38 +0200
commitaa3eeb38f95e722238abe5135155d4882613df47 (patch)
treef5690d782e41fd2f899504b23b90997f4c8a0bf5
parentaf99a4dc055c8c63d3d13f1e53aadabfa9b13a06 (diff)
downloadlibssh-aa3eeb38f95e722238abe5135155d4882613df47.tar.gz
libssh-aa3eeb38f95e722238abe5135155d4882613df47.tar.xz
libssh-aa3eeb38f95e722238abe5135155d4882613df47.zip
scp: Document more scp functionts.
-rw-r--r--src/scp.c34
1 files changed, 31 insertions, 3 deletions
diff --git a/src/scp.c b/src/scp.c
index aba4a2dd..6838a3cd 100644
--- a/src/scp.c
+++ b/src/scp.c
@@ -83,7 +83,17 @@ ssh_scp ssh_scp_new(ssh_session session, int mode, const char *location){
return scp;
}
-int ssh_scp_init(ssh_scp scp){
+/**
+ * @brief Initialize the scp channel.
+ *
+ * @param[in] scp The scp context to initialize.
+ *
+ * @return SSH_OK on success or an SSH error code.
+ *
+ * @see ssh_scp_new()
+ */
+int ssh_scp_init(ssh_scp scp)
+{
int r;
char execbuffer[1024];
uint8_t code;
@@ -139,7 +149,17 @@ int ssh_scp_init(ssh_scp scp){
return SSH_OK;
}
-int ssh_scp_close(ssh_scp scp){
+/**
+ * @brief Close the scp channel.
+ *
+ * @param[in] scp The scp context to close.
+ *
+ * @return SSH_OK on success or an SSH error code.
+ *
+ * @see ssh_scp_init()
+ */
+int ssh_scp_close(ssh_scp scp)
+{
char buffer[128];
int err;
if(scp==NULL)
@@ -169,7 +189,15 @@ int ssh_scp_close(ssh_scp scp){
return SSH_OK;
}
-void ssh_scp_free(ssh_scp scp){
+/**
+ * @brief Free a scp context.
+ *
+ * @param[in] scp The context to free.
+ *
+ * @see ssh_scp_new()
+ */
+void ssh_scp_free(ssh_scp scp)
+{
if(scp==NULL)
return;
if(scp->state != SSH_SCP_NEW)