mirror of
https://github.com/upa/mscp.git
synced 2026-05-19 02:57:30 +08:00
fix cleanup
This commit is contained in:
@@ -44,10 +44,9 @@ class mscp:
|
|||||||
self.stop()
|
self.stop()
|
||||||
if self.state == _STATE_STOPPED:
|
if self.state == _STATE_STOPPED:
|
||||||
self.join()
|
self.join()
|
||||||
if self.state == _STATE_JOINED:
|
|
||||||
self.cleanup()
|
self.cleanup()
|
||||||
if self.state == _STATE_CLEANED:
|
self.free()
|
||||||
self.free()
|
|
||||||
|
|
||||||
def _state2str(self):
|
def _state2str(self):
|
||||||
return _state_str[self.state]
|
return _state_str[self.state]
|
||||||
|
|||||||
@@ -571,6 +571,11 @@ static void free_chunk(struct list_head *list)
|
|||||||
|
|
||||||
void mscp_cleanup(struct mscp *m)
|
void mscp_cleanup(struct mscp *m)
|
||||||
{
|
{
|
||||||
|
if (m->first) {
|
||||||
|
ssh_sftp_close(m->first);
|
||||||
|
m->first = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
release_list(&m->src_list, free_src);
|
release_list(&m->src_list, free_src);
|
||||||
INIT_LIST_HEAD(&m->src_list);
|
INIT_LIST_HEAD(&m->src_list);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user