mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
SFTP connections are shown now in 'Active VFS connections' list.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
4841bc608a
commit
8f15940f50
@ -634,6 +634,34 @@ sftpfs_cb_errno (struct vfs_class *me)
|
||||
return errno;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/**
|
||||
* Callback for fill_names VFS function.
|
||||
* Add SFTP connections to the 'Active VFS connections' list
|
||||
*
|
||||
* @param me unused
|
||||
* @param func callback function for adding SFTP-connection to list of active connections
|
||||
*/
|
||||
|
||||
static void
|
||||
sftpfs_cb_fill_names (struct vfs_class *me, fill_names_f func)
|
||||
{
|
||||
GList *iter;
|
||||
|
||||
(void) me;
|
||||
|
||||
for (iter = sftpfs_subclass.supers; iter != NULL; iter = g_list_next (iter))
|
||||
{
|
||||
const struct vfs_s_super *super = (const struct vfs_s_super *) iter->data;
|
||||
char *name;
|
||||
|
||||
name = vfs_path_element_build_pretty_path_str (super->path_element);
|
||||
|
||||
func (name);
|
||||
g_free (name);
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
/*** public functions ****************************************************************************/
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
@ -663,6 +691,8 @@ sftpfs_init_class_callbacks (void)
|
||||
sftpfs_class.init = sftpfs_cb_init;
|
||||
sftpfs_class.done = sftpfs_cb_done;
|
||||
|
||||
sftpfs_class.fill_names = sftpfs_cb_fill_names;
|
||||
|
||||
sftpfs_class.opendir = sftpfs_cb_opendir;
|
||||
sftpfs_class.readdir = sftpfs_cb_readdir;
|
||||
sftpfs_class.closedir = sftpfs_cb_closedir;
|
||||
|
Loading…
Reference in New Issue
Block a user