diff --git a/core/pluginmsg.h b/core/pluginmsg.h index 7a43ee2..ec4e9cb 100755 --- a/core/pluginmsg.h +++ b/core/pluginmsg.h @@ -64,6 +64,15 @@ // in l1 you have the old id, in l2 you have the new id #define WINIX_SESSION_CHANGED_ID 30025 +// a session is going to be removed +// it is called from session manager's thread (with lock/unlock) +#define WINIX_PREPARE_SESSION_TO_REMOVE 30027 + +// a session has been removed +// it is called from session manager's thread (with lock/unlock) +// in l1 you have the old session id +#define WINIX_SESSION_REMOVED 30029 + // the winix is closing // there is not any sessions available (cur->session is null) // session pointer is null diff --git a/core/sessionmanager.cpp b/core/sessionmanager.cpp index 4a4345c..2eaae89 100755 --- a/core/sessionmanager.cpp +++ b/core/sessionmanager.cpp @@ -514,7 +514,11 @@ void SessionManager::DeleteSession(Session * del_session) del_session->puser = 0; } + long id = del_session->id; + + plugin.Call(del_session, WINIX_PREPARE_SESSION_TO_REMOVE); session_tab.EraseById(del_session->id); + plugin.Call((Session*)0, WINIX_SESSION_REMOVED, id); }