mirror of
https://github.com/upa/mscp.git
synced 2026-02-23 16:34:44 +08:00
add message.h and message.c, mscp_set|get_error()
Instead of pr_err(), libmscp uses mscp_set_error() and applications use mscp_get_errror() to get error message.
This commit is contained in:
@@ -63,6 +63,12 @@ struct mscp;
|
||||
struct mscp *mscp_init(const char *remote_host,
|
||||
struct mscp_opts *o, struct mscp_ssh_opts *s);
|
||||
|
||||
/* return a fd for read message from mscp */
|
||||
int mscp_msg_fd(struct mscp *m);
|
||||
|
||||
/* get message for the most recent error (not thread safe) */
|
||||
const char *mscp_get_error();
|
||||
|
||||
/* establish the first SFTP session. mscp_prepare() and mscp_start()
|
||||
* requires mscp_connect() beforehand */
|
||||
int mscp_connect(struct mscp *m);
|
||||
|
||||
Reference in New Issue
Block a user