From 2c66a7486284a21339ec69325236339d648d2a17 Mon Sep 17 00:00:00 2001 From: paulc Date: Sun, 10 May 2009 15:50:08 +0000 Subject: [PATCH] Added Cisco Session Manager module. Fixed session user cleanup. git-svn-id: http://yate.null.ro/svn/yate/trunk@2622 acf43c95-373e-0410-b603-e72c3f656dc1 --- modules/server/ciscosm.cpp | 12 +- windows/YATE.sln | 13 +- windows/_ciscosm.vcproj | 274 +++++++++++++++++++++++++++++++++++++ windows/yate.iss | 2 + 4 files changed, 297 insertions(+), 4 deletions(-) create mode 100644 windows/_ciscosm.vcproj diff --git a/modules/server/ciscosm.cpp b/modules/server/ciscosm.cpp index 90b78eb6..cc75d3ab 100644 --- a/modules/server/ciscosm.cpp +++ b/modules/server/ciscosm.cpp @@ -1235,19 +1235,25 @@ void SessionManager::initSesion() bool SessionManager::insert(SessionUser* user) { - Lock mylock(this); if (!user) return false; + Lock mylock(this); m_users.append(new UserPointer(user)); return true; } void SessionManager::remove(SessionUser* user) { - Lock mylock(this); if (!user) return; - m_users.remove(UserPointer(user)); + Lock mylock(this); + for (ObjList* obj = m_users.skipNull(); obj; obj = obj->skipNext()) { + UserPointer* u = static_cast(obj->get()); + if (static_cast(*u) == user) { + obj->remove(); + return; + } + } } // Send a PDU message if state is operational else return false diff --git a/windows/YATE.sln b/windows/YATE.sln index b73c17d0..6c94ca2b 100644 --- a/windows/YATE.sln +++ b/windows/YATE.sln @@ -33,7 +33,7 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modules", "Modules.vcproj", "{BE362993-354F-4315-B878-05E952E1D164}" ProjectSection(ProjectDependencies) = postProject {5F248A16-8E3D-497A-8E68-F9E08971F583} = {5F248A16-8E3D-497A-8E68-F9E08971F583} - {88C1CABC-C1AF-4888-A4A1-C0798EDB3947} = {88C1CABC-C1AF-4888-A4A1-C0798EDB3947} + {8AD176D9-C038-455F-C3A4-453D0AB610BC} = {8AD176D9-C038-455F-C3A4-453D0AB610BC} {C296BBF2-AD56-4249-AEF6-C04B03131474} = {C296BBF2-AD56-4249-AEF6-C04B03131474} {88C1CCEC-C1AF-4888-A4A1-C0798EDB3947} = {88C1CCEC-C1AF-4888-A4A1-C0798EDB3947} {A9CA94EB-27BA-46FA-A585-94D36706C4D7} = {A9CA94EB-27BA-46FA-A585-94D36706C4D7} @@ -52,6 +52,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modules", "Modules.vcproj", {56A805CD-59D3-41AE-8992-2A2F5C99DC67} = {56A805CD-59D3-41AE-8992-2A2F5C99DC67} {5F4005CD-2BA3-40C8-8348-726F5C99D964} = {5F4005CD-2BA3-40C8-8348-726F5C99D964} {6E6F6DC8-4B8F-4237-9FEC-BE3BBF268558} = {6E6F6DC8-4B8F-4237-9FEC-BE3BBF268558} + {88C1CABC-C1AF-4888-A4A1-C0798EDB3947} = {88C1CABC-C1AF-4888-A4A1-C0798EDB3947} {5F4005AA-CB7F-47C8-8598-726F5C506964} = {5F4005AA-CB7F-47C8-8598-726F5C506964} {2F410A9D-D671-4928-7ACF-7268AF39D934} = {2F410A9D-D671-4928-7ACF-7268AF39D934} {BA27419A-2595-49D6-B363-492B1180E885} = {BA27419A-2595-49D6-B363-492B1180E885} @@ -438,6 +439,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_queuesnotify", "_queuesnot {254C6F00-6DE5-44A6-AD44-ACABA8912381} = {254C6F00-6DE5-44A6-AD44-ACABA8912381} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ciscosm", "_ciscosm.vcproj", "{8AD176D9-C038-455F-C3A4-453D0AB610BC}" + ProjectSection(ProjectDependencies) = postProject + {254C6F00-6DE5-44A6-AD44-ACABA8912381} = {254C6F00-6DE5-44A6-AD44-ACABA8912381} + {496A2084-FFED-4F73-8C85-170042A34F38} = {496A2084-FFED-4F73-8C85-170042A34F38} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -744,6 +751,10 @@ Global {88C1CABC-C1AF-4888-A4A1-C0798EDB3947}.Debug|Win32.Build.0 = Debug|Win32 {88C1CABC-C1AF-4888-A4A1-C0798EDB3947}.Release|Win32.ActiveCfg = Release|Win32 {88C1CABC-C1AF-4888-A4A1-C0798EDB3947}.Release|Win32.Build.0 = Release|Win32 + {8AD176D9-C038-455F-C3A4-453D0AB610BC}.Debug|Win32.ActiveCfg = Debug|Win32 + {8AD176D9-C038-455F-C3A4-453D0AB610BC}.Debug|Win32.Build.0 = Debug|Win32 + {8AD176D9-C038-455F-C3A4-453D0AB610BC}.Release|Win32.ActiveCfg = Release|Win32 + {8AD176D9-C038-455F-C3A4-453D0AB610BC}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/windows/_ciscosm.vcproj b/windows/_ciscosm.vcproj new file mode 100644 index 00000000..b01e8f87 --- /dev/null +++ b/windows/_ciscosm.vcproj @@ -0,0 +1,274 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/windows/yate.iss b/windows/yate.iss index 5741f547..205e91c9 100644 --- a/windows/yate.iss +++ b/windows/yate.iss @@ -77,6 +77,8 @@ Source: "Release\yate-console.exe"; DestDir: "{app}"; Flags: replacesameversion; Source: "Release\server\accfile.yate"; DestDir: "{app}\modules\server"; Flags: replacesameversion; Components: client server Source: "Release\server\analog.yate"; DestDir: "{app}\modules\server"; Flags: replacesameversion; Components: server\pstn +Source: "Release\server\ysigchan.yate"; DestDir: "{app}\modules\server"; Flags: replacesameversion; Components: server\pstn +Source: "Release\server\ciscosm.yate"; DestDir: "{app}\modules\server"; Flags: replacesameversion; Components: server\pstn Source: "Release\analyzer.yate"; DestDir: "{app}\modules"; Flags: replacesameversion; Components: server debug Source: "Release\callfork.yate"; DestDir: "{app}\modules"; Flags: replacesameversion; Components: server Source: "Release\callgen.yate"; DestDir: "{app}\modules"; Flags: replacesameversion; Components: debug