add wrapper code to fully encapsulate apr, apr-utils, pcre, and sqlite. fully use switch_ namespace in modules, create our own format and type defines. follow up commit for unix autotools coming soon after this. PLEASE NOTE: you will NEED to do a make megaclean and run configure again after this update (and the following commit) or it will not build.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4494 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
2d78da120a
commit
42e78242a3
261
Freeswitch.sln
261
Freeswitch.sln
|
@ -3,22 +3,20 @@ Microsoft Visual Studio Solution File, Format Version 9.00
|
|||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchConsole", "w32\Console\FreeSwitchConsole.vcproj", "{1AF3A893-F7BE-43DD-B697-8AB2397C0D67}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchCoreLib", "w32\Library\FreeSwitchCore.vcproj", "{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EEF031CB-FED8-451E-A471-91EC8D4F6750}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
|
||||
{50AD0E28-B8D7-4FCC-8FC3-599F6AC69761} = {50AD0E28-B8D7-4FCC-8FC3-599F6AC69761}
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EEF031CB-FED8-451E-A471-91EC8D4F6750}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g729", "src\mod\codecs\mod_g729\mod_g729.vcproj", "{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}"
|
||||
|
@ -28,42 +26,34 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g729", "src\mod\codecs\
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_gsm", "src\mod\codecs\mod_gsm\mod_gsm.vcproj", "{4926323F-4EA8-4B7D-A3D3-65488725988F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8FD2E297-4096-47E5-9258-C48FF1841523} = {8FD2E297-4096-47E5-9258-C48FF1841523}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{8FD2E297-4096-47E5-9258-C48FF1841523} = {8FD2E297-4096-47E5-9258-C48FF1841523}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_xmpp_event", "src\mod\event_handlers\mod_xmpp_event\mod_xmpp_event.vcproj", "{F10BE67C-A8FF-4CB2-AF29-D46D2590DC59}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_sndfile", "src\mod\formats\mod_sndfile\mod_sndfile.vcproj", "{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{3D0370CA-BED2-4657-A475-32375CBCB6E4} = {3D0370CA-BED2-4657-A475-32375CBCB6E4}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{3D0370CA-BED2-4657-A475-32375CBCB6E4} = {3D0370CA-BED2-4657-A475-32375CBCB6E4}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_bridgecall", "src\mod\applications\mod_bridgecall\mod_bridgecall.vcproj", "{E1794405-29D4-466D-9BE3-DD2344C2A663}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_test", "src\mod\event_handlers\mod_event_test\mod_event_test.vcproj", "{3A2A7795-C216-4FFF-B8EF-4D17A84BACCC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g711", "src\mod\codecs\mod_g711\mod_g711.vcproj", "{B1FE4613-3F4B-4DAF-9714-2472BF8F56AE}"
|
||||
|
@ -73,28 +63,22 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g711", "src\mod\codecs\
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_iax", "src\mod\endpoints\mod_iax\mod_iax.vcproj", "{3A5B9131-F20C-4A85-9447-6C1610941CEE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E} = {5CC054B7-6DAA-46BF-9A08-3B33B83E8D3E}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_playback", "src\mod\applications\mod_playback\mod_playback.vcproj", "{78100236-7CEA-4948-96CC-E8ED3160329C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_PortAudio", "src\mod\endpoints\mod_portaudio\mod_PortAudio.vcproj", "{5FD31A25-5D83-4794-8BEE-904DAD84CE71}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99} = {0A18A071-125E-442F-AFF7-A3F68ABECF99}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{0A18A071-125E-442F-AFF7-A3F68ABECF99} = {0A18A071-125E-442F-AFF7-A3F68ABECF99}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_l16", "src\mod\codecs\mod_l16\mod_l16.vcproj", "{5844AFE1-AA3E-4BDB-A9EF-119AEF19DF88}"
|
||||
|
@ -104,24 +88,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_l16", "src\mod\codecs\m
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_softtimer", "src\mod\timers\mod_softtimer\mod_softtimer.vcproj", "{DCC13474-28DF-47CA-A8EB-72F8CE9A78C5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_speex", "src\mod\codecs\mod_speex\mod_speex.vcproj", "{5580D60E-0F77-4716-9CD4-B8E5986FA375}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{1C469CDD-A3AF-4A94-A592-B2CF12F2D918} = {1C469CDD-A3AF-4A94-A592-B2CF12F2D918}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{1C469CDD-A3AF-4A94-A592-B2CF12F2D918} = {1C469CDD-A3AF-4A94-A592-B2CF12F2D918}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_woomera", "src\mod\endpoints\mod_woomera\mod_woomera.vcproj", "{FE3540C5-3303-46E0-A69E-D92F775687F1}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Codecs", "Codecs", "{F881ADA2-2F1A-4046-9FEB-191D9422D781}"
|
||||
|
@ -144,19 +124,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "docs", "docs\docs.vcproj",
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dialplan_xml", "src\mod\dialplans\mod_dialplan_xml\mod_dialplan_xml.vcproj", "{07113B25-D3AF-4E04-BA77-4CD1171F022C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_ivrtest", "src\mod\applications\mod_ivrtest\mod_ivrtest.vcproj", "{419AA391-5F3F-4BFE-A869-9D154D62A792}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "FreeSwitchSetup", "w32\Setup\Setup.vdproj", "{B17FFBE6-A942-4056-8346-B624FB5D995B}"
|
||||
|
@ -170,28 +145,22 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_ldap", "src\mod\directo
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dialplan_directory", "src\mod\dialplans\mod_dialplan_directory\mod_dialplan_directory.vcproj", "{A27CCA23-1541-4337-81A4-F0A6413078A0}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_zeroconf", "src\mod\event_handlers\mod_zeroconf\mod_zeroconf.vcproj", "{C7705DC4-2088-493E-AF8D-65BC6D65C125}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE} = {0D826AF5-0506-4C50-BB8B-7DB019AC21AE}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{49C34584-B6DA-448F-83CF-27584DC9FC90} = {49C34584-B6DA-448F-83CF-27584DC9FC90}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{49C34584-B6DA-448F-83CF-27584DC9FC90} = {49C34584-B6DA-448F-83CF-27584DC9FC90}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE} = {0D826AF5-0506-4C50-BB8B-7DB019AC21AE}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_multicast", "src\mod\event_handlers\mod_event_multicast\mod_event_multicast.vcproj", "{784113EF-44D9-4949-835D-7065D3C7AD08}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libteletone", "libs\libteletone\libteletone.vcproj", "{89385C74-5860-4174-9CAF-A39E7C48909C}"
|
||||
|
@ -200,14 +169,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Languages", "Languages", "{
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey", "src\mod\languages\mod_spidermonkey\mod_spidermonkey.vcproj", "{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ASR-TTS", "ASR-TTS", "{4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}"
|
||||
|
@ -229,36 +194,28 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_perl", "src\mod\languag
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_echo", "src\mod\applications\mod_echo\mod_echo.vcproj", "{0E2C6395-13B9-46E5-9264-8859D346018D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_ilbc", "src\mod\codecs\mod_ilbc\mod_ilbc.vcproj", "{D3EC0AFF-76FC-4210-A825-9A17410660A3}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{989BB874-7AF1-44CB-8E5C-CC8113D267E8} = {989BB874-7AF1-44CB-8E5C-CC8113D267E8}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{989BB874-7AF1-44CB-8E5C-CC8113D267E8} = {989BB874-7AF1-44CB-8E5C-CC8113D267E8}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dingaling", "src\mod\endpoints\mod_dingaling\mod_dingaling.vcproj", "{FFAA4C52-3A53-4F99-90C1-D59D1F0427F3}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{1906D736-08BD-4EE1-924F-B536249B9A54} = {1906D736-08BD-4EE1-924F-B536249B9A54}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_commands", "src\mod\applications\mod_commands\mod_commands.vcproj", "{30A5B29C-983E-4580-9FD0-D647CCDCC7EB}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Loggers", "Loggers", "{A7AB4405-FDB7-4853-9FBB-1516B1C3D80A}"
|
||||
|
@ -272,58 +229,42 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "XML Interfaces", "XML Inter
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_xml_rpc", "src\mod\xml_int\mod_xml_rpc\mod_xml_rpc.vcproj", "{CBEC7225-0C21-4DA8-978E-1F158F8AD950}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{155844C3-EC5F-407F-97A4-A2DDADED9B2F} = {155844C3-EC5F-407F-97A4-A2DDADED9B2F}
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{A3FE0076-B366-429D-A238-D7304DA7D3C1} = {A3FE0076-B366-429D-A238-D7304DA7D3C1}
|
||||
{356EC96D-4C9F-47B5-9083-FC328B87BA94} = {356EC96D-4C9F-47B5-9083-FC328B87BA94}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{356EC96D-4C9F-47B5-9083-FC328B87BA94} = {356EC96D-4C9F-47B5-9083-FC328B87BA94}
|
||||
{A3FE0076-B366-429D-A238-D7304DA7D3C1} = {A3FE0076-B366-429D-A238-D7304DA7D3C1}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
|
||||
{155844C3-EC5F-407F-97A4-A2DDADED9B2F} = {155844C3-EC5F-407F-97A4-A2DDADED9B2F}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_rss", "src\mod\applications\mod_rss\mod_rss.vcproj", "{B69247FA-ECD6-40ED-8E44-5CA6C3BAF9A4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_conference", "src\mod\applications\mod_conference\mod_conference.vcproj", "{C24FB505-05D7-4319-8485-7540B44C8603}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_dptools", "src\mod\applications\mod_dptools\mod_dptools.vcproj", "{B5881A85-FE70-4F64-8607-2CAAE52669C6}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_socket", "src\mod\event_handlers\mod_event_socket\mod_event_socket.vcproj", "{05515420-16DE-4E63-BE73-85BE85BA5142}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_cdr", "src\mod\event_handlers\mod_cdr\mod_cdr.vcproj", "{3D1EED36-A510-4EDB-B4D9-4E0F4A5EC2A8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Libraries", "_Libraries", "{EB910B0D-F27D-4B62-B67B-DE834C99AC5B}"
|
||||
|
@ -336,6 +277,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libiax2", "libs\iax\libiax2
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdingaling", "libs\libdingaling\libdingaling.vcproj", "{1906D736-08BD-4EE1-924F-B536249B9A54}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{E727E8F6-935D-46FE-8B0E-37834748A0E3} = {E727E8F6-935D-46FE-8B0E-37834748A0E3}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
@ -361,8 +303,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libapriconv", "libs\win32\a
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libaprutil", "libs\win32\apr-util\libaprutil.vcproj", "{F057DA7F-79E5-4B00-845C-EF446EF055E3}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Downloads", "_Downloads", "{C120A020-773F-4EA3-923F-B67AF28B750D}"
|
||||
|
@ -380,8 +322,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "howl static library", "libs
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mDNSResponder static library", "libs\win32\howl\libmDNSResponder.vcproj", "{49C34584-B6DA-448F-83CF-27584DC9FC90}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE} = {0D826AF5-0506-4C50-BB8B-7DB019AC21AE}
|
||||
{5927104D-C14C-4AC8-925C-4AB681762E75} = {5927104D-C14C-4AC8-925C-4AB681762E75}
|
||||
{0D826AF5-0506-4C50-BB8B-7DB019AC21AE} = {0D826AF5-0506-4C50-BB8B-7DB019AC21AE}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsndfile", "libs\win32\libsndfile\libsndfile.vcproj", "{3D0370CA-BED2-4657-A475-32375CBCB6E4}"
|
||||
|
@ -401,49 +343,40 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "js", "libs\win32\js\js.vcpr
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_sofia", "src\mod\endpoints\mod_sofia\mod_sofia.vcproj", "{0DF3ABD0-DDC0-4265-B778-07C66780979B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0} = {70A49BC2-7500-41D0-B75D-EDCC5BE987A0}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0} = {70A49BC2-7500-41D0-B75D-EDCC5BE987A0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libg726", "libs\codec\g726\libg726.vcproj", "{5A6A281A-AA50-470A-8305-202BDA1CD1BF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g726", "src\mod\codecs\mod_g726\mod_g726.vcproj", "{486369EB-F150-4B56-BCC8-77B9E18FF5F5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{5A6A281A-AA50-470A-8305-202BDA1CD1BF} = {5A6A281A-AA50-470A-8305-202BDA1CD1BF}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libg7xx", "libs\codec\g7xx\libg7xx.vcproj", "{D71E7338-8D9C-4FE4-A15F-D5CC60202C7C}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g722", "src\mod\codecs\mod_g722\mod_g722.vcproj", "{D42518CC-7475-454D-B392-0E132C07D761}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{D71E7338-8D9C-4FE4-A15F-D5CC60202C7C} = {D71E7338-8D9C-4FE4-A15F-D5CC60202C7C}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_park", "src\mod\applications\mod_park\mod_park.vcproj", "{2740F45C-475A-4DE0-BCED-6E2E5F6C4B8B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsofia_sip_ua_static", "libs\win32\sofia\libsofia_sip_ua_static.vcproj", "{70A49BC2-7500-41D0-B75D-EDCC5BE987A0}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A} = {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}
|
||||
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}
|
||||
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A} = {8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download PTHREAD", "libs\win32\Download PTHREAD.vcproj", "{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A}"
|
||||
|
@ -455,82 +388,67 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthread", "libs\win32\pthre
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g723_1", "src\mod\codecs\mod_g723_1\mod_g723_1.vcproj", "{FEA1EEF7-876F-48DE-88BF-C0E3E606D758}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_native_file", "src\mod\formats\mod_native_file\mod_native_file.vcproj", "{9254C4B0-6F60-42B6-BB3A-36D63FC001C7}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeSwitch.NET", "src\dotnet\FreeSwitch.NET.csproj", "{251CAABC-16C3-4593-A491-603B908094E0}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_core_db", "src\mod\languages\mod_spidermonkey_core_db\mod_spidermonkey_core_db.vcproj", "{ACFFF684-4D19-4D48-AF12-88EA1D778BDF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_teletone", "src\mod\languages\mod_spidermonkey_teletone\mod_spidermonkey_teletone.vcproj", "{8F992C49-6C51-412F-B2A3-34EAB708EB65}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libudns", "libs\win32\udns\libudns.vcproj", "{4043FC6A-9A30-4577-8AD5-9B233C9575D8}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_enum", "src\mod\applications\mod_enum\mod_enum.vcproj", "{71A967D5-0E99-4CEF-A587-98836EE6F2EF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{4043FC6A-9A30-4577-8AD5-9B233C9575D8} = {4043FC6A-9A30-4577-8AD5-9B233C9575D8}
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{4043FC6A-9A30-4577-8AD5-9B233C9575D8} = {4043FC6A-9A30-4577-8AD5-9B233C9575D8}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_etpan", "src\mod\languages\mod_spidermonkey_etpan\mod_spidermonkey_etpan.vcproj", "{D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE} = {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
|
||||
{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE} = {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_odbc", "src\mod\languages\mod_spidermonkey_odbc\mod_spidermonkey_odbc.vcproj", "{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libetpan", "libs\win32\etpan\libetpan.vcproj", "{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_xml_curl", "src\mod\xml_int\mod_xml_curl\mod_xml_curl.vcproj", "{AB91A099-7690-4ECF-8994-E458F4EA1ED4}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
|
||||
{87EE9DA4-DE1E-4448-8324-183C98DCA588} = {87EE9DA4-DE1E-4448-8324-183C98DCA588}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
|
@ -538,17 +456,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "say", "say", "{6CD61A1D-797
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_say_en", "src\mod\say\mod_say_en\mod_say_en.vcproj", "{988CACF7-3FCB-4992-BE69-77872AE67DC8}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portaudio", "libs\portaudio\build\msvc\portaudio.vcproj", "{0A18A071-125E-442F-AFF7-A3F68ABECF99}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_xml_cdr", "src\mod\xml_int\mod_xml_cdr\mod_xml_cdr.vcproj", "{08DAD348-9E0A-4A2E-97F1-F1E7E24A7836}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
|
||||
{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
|
||||
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_amr", "src\mod\codecs\mod_amr\mod_amr.vcproj", "{8DEB383C-4091-4F42-A56F-C9E46D552D79}"
|
||||
|
@ -826,17 +743,17 @@ Global
|
|||
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.Release|Win32.Build.0 = Release|Win32
|
||||
{EEF031CB-FED8-451E-A471-91EC8D4F6750}.Release|x64.ActiveCfg = Release|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Debug|Win32.ActiveCfg = Debug DLL|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Debug|Win32.Build.0 = Debug DLL|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Release|Win32.ActiveCfg = Release DLL|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Release|Win32.Build.0 = Release DLL|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Release|Win32.Build.0 = Release|Win32
|
||||
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}.Release|x64.ActiveCfg = Release|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Debug|Win32.ActiveCfg = Debug DLL|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Debug|Win32.Build.0 = Debug DLL|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Release|Win32.ActiveCfg = Release DLL|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Release|Win32.Build.0 = Release DLL|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Release|Win32.Build.0 = Release|Win32
|
||||
{8D04B550-D240-4A44-8A18-35DA3F7038D9}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1CED5987-A529-46DC-B30F-870D85FF9C94}.Debug|Win32.Build.0 = Debug|Win32
|
||||
|
|
110
Makefile.am
110
Makefile.am
|
@ -4,82 +4,46 @@ AUTOMAKE_OPTS = gnu foreign
|
|||
NAME=freeswitch
|
||||
PREFIX=$(prefix)
|
||||
|
||||
AM_CFLAGS = $(new_AM_CFLAGS)
|
||||
AM_CFLAGS = $(new_AM_CFLAGS)
|
||||
AM_CPPFLAGS = $(AM_CFLAGS)
|
||||
AM_LDFLAGS = $(new_AM_LDFLAGS)
|
||||
|
||||
APR_CONFIG=$(prefix)/bin/apr-1-config
|
||||
APU_CONFIG=$(prefix)/bin/apu-1-config
|
||||
AM_CFLAGS += -I$(PREFIX)/include $(shell $(APR_CONFIG) --cflags --cppflags --includes) -I${prefix}/include/srtp
|
||||
AM_LDFLAGS += -L$(PREFIX)/lib
|
||||
AM_LDFLAGS += $(shell $(APR_CONFIG) --link-ld --libs )
|
||||
AM_CFLAGS += $(shell $(APU_CONFIG) --includes)
|
||||
AM_LDFLAGS += $(shell $(APU_CONFIG) --link-ld --libs )
|
||||
AM_LDFLAGS += -lm -L/usr/local/lib/db42 -L/usr/local/lib
|
||||
AM_LDFLAGS += -lsqlite3 -lpcre
|
||||
AM_LDFLAGS = $(new_AM_LDFLAGS)
|
||||
BASE = $(PWD)
|
||||
OSARCH=$(shell uname -s)
|
||||
LIBTOOL=$(PWD)/libtool
|
||||
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
|
||||
|
||||
FIRST_INCLUDES = -I$(PWD)/src/include -I$(PWD)
|
||||
AM_CFLAGS += $(FIRST_INCLUDES) -I$(PREFIX)/include
|
||||
|
||||
AM_LDFLAGS += -L$(PREFIX)/lib
|
||||
AM_LDFLAGS += -lm -L/usr/local/lib/db42 -L/usr/local/lib
|
||||
|
||||
if CRASHPROT
|
||||
AM_CFLAGS += -DCRASH_PROT
|
||||
endif
|
||||
|
||||
AM_CFLAGS +=-I$(PWD)/src/sqlite -I$(PWD) -I$(PWD)/src/include -I$(PREFIX)/include
|
||||
AM_CFLAGS += -DSWITCH_MOD_DIR=\"$(PREFIX)/mod\"
|
||||
AM_CFLAGS += -DSWITCH_PREFIX_DIR=\"$(PREFIX)\"
|
||||
AM_CFLAGS += -DSWITCH_CONF_DIR=\"$(PREFIX)/conf\"
|
||||
AM_CFLAGS += -DSWITCH_DB_DIR=\"$(PREFIX)/db\"
|
||||
AM_CFLAGS += -DSWITCH_LOG_DIR=\"$(PREFIX)/log\"
|
||||
AM_CFLAGS += -DSWITCH_SCRIPT_DIR=\"$(PREFIX)/scripts\"
|
||||
AM_CFLAGS += -DSWITCH_HTDOCS_DIR=\"$(PREFIX)/htdocs\"
|
||||
AM_CFLAGS += -DSWITCH_GRAMMAR_DIR=\"$(PREFIX)/grammar\"
|
||||
|
||||
|
||||
libfreeswitch_la_SOURCES = \
|
||||
src/include/switch_am_config.h\
|
||||
src/include/switch.h\
|
||||
src/include/switch_apr.h\
|
||||
src/include/switch_buffer.h\
|
||||
src/include/switch_caller.h\
|
||||
src/include/switch_channel.h\
|
||||
src/include/switch_config.h\
|
||||
src/include/switch_console.h\
|
||||
src/include/switch_core.h\
|
||||
src/include/switch_event.h\
|
||||
src/include/switch_frame.h\
|
||||
src/include/switch_ivr.h\
|
||||
src/include/switch_loadable_module.h\
|
||||
src/include/switch_module_interfaces.h\
|
||||
src/include/switch_platform.h\
|
||||
src/include/switch_resample.h\
|
||||
src/include/switch_sqlite.h\
|
||||
src/include/switch_types.h\
|
||||
src/include/switch_utils.h\
|
||||
src/include/switch_version.h\
|
||||
src/include/switch_rtp.h\
|
||||
src/include/switch_stun.h\
|
||||
src/include/switch_log.h\
|
||||
src/include/switch_xml.h\
|
||||
src/switch_rtp.c\
|
||||
src/switch_apr.c \
|
||||
src/switch_buffer.c \
|
||||
src/switch_caller.c \
|
||||
src/switch_channel.c \
|
||||
src/switch_config.c \
|
||||
src/switch_console.c \
|
||||
src/switch_core.c \
|
||||
src/switch_core_db.c\
|
||||
src/switch_loadable_module.c \
|
||||
src/switch_utils.c \
|
||||
src/switch_event.c \
|
||||
src/switch_resample.c \
|
||||
src/switch_regex.c\
|
||||
src/switch_rtp.c\
|
||||
src/switch_ivr.c \
|
||||
src/switch_stun.c\
|
||||
src/switch_log.c\
|
||||
src/switch_xml.c
|
||||
|
||||
|
||||
|
||||
#bindir = $(PREFIX)/bin
|
||||
#libdir = $(PREFIX)/lib
|
||||
library_includedir = $(PREFIX)/include
|
||||
|
||||
library_include_HEADERS = \
|
||||
src/include/switch_am_config.h\
|
||||
src/include/switch.h\
|
||||
|
@ -90,6 +54,7 @@ src/include/switch_channel.h\
|
|||
src/include/switch_config.h\
|
||||
src/include/switch_console.h\
|
||||
src/include/switch_core.h\
|
||||
src/include/switch_core_db.h\
|
||||
src/include/switch_event.h\
|
||||
src/include/switch_frame.h\
|
||||
src/include/switch_ivr.h\
|
||||
|
@ -97,7 +62,7 @@ src/include/switch_loadable_module.h\
|
|||
src/include/switch_module_interfaces.h\
|
||||
src/include/switch_platform.h\
|
||||
src/include/switch_resample.h\
|
||||
src/include/switch_sqlite.h\
|
||||
src/include/switch_regex.h\
|
||||
src/include/switch_types.h\
|
||||
src/include/switch_utils.h\
|
||||
src/include/switch_rtp.h\
|
||||
|
@ -109,13 +74,40 @@ src/include/switch_xml.h
|
|||
BUILT_SOURCES = version depends
|
||||
CLEANFILES = src/include/switch_version.h scripts/fsxs
|
||||
|
||||
APR_CONFIG=$(PWD)/libs/apr/apr-1-config
|
||||
APU_CONFIG=$(PWD)/libs/apr-util/apu-1-config
|
||||
|
||||
lib_LTLIBRARIES = libfreeswitch.la
|
||||
libfreeswitch_la_CFLAGS = $(AM_CFLAGS)
|
||||
libfreeswitch_la_LDFLAGS = -version-info 1:0:0
|
||||
libfreeswitch_la_LIBADD = -lteletone -lresample -lsrtp -lsqlite3 -lpcre
|
||||
CORE_INCLUDES = -I$(PWD)/libs/apr/include
|
||||
CORE_INCLUDES += -I$(PWD)/libs/apr-util/include
|
||||
CORE_INCLUDES += -I$(PWD)/libs/sqlite
|
||||
CORE_INCLUDES += -I$(PWD)/libs/pcre
|
||||
CORE_INCLUDES += -I$(PWD)/libs/srtp/include
|
||||
CORE_INCLUDES += -I$(PWD)/libs/srtp/crypto/include
|
||||
CORE_INCLUDES += -I$(PWD)/libs/libresample/include
|
||||
CORE_INCLUDES += -I$(PWD)/libs/libteletone/src
|
||||
|
||||
CORE_CFLAGS = $(shell $(APR_CONFIG) --cflags --cppflags --includes)
|
||||
CORE_CFLAGS += $(shell $(APU_CONFIG) --includes)
|
||||
CORE_CFLAGS += -DSWITCH_MOD_DIR=\"$(PREFIX)/mod\"
|
||||
CORE_CFLAGS += -DSWITCH_PREFIX_DIR=\"$(PREFIX)\"
|
||||
CORE_CFLAGS += -DSWITCH_CONF_DIR=\"$(PREFIX)/conf\"
|
||||
CORE_CFLAGS += -DSWITCH_DB_DIR=\"$(PREFIX)/db\"
|
||||
CORE_CFLAGS += -DSWITCH_LOG_DIR=\"$(PREFIX)/log\"
|
||||
CORE_CFLAGS += -DSWITCH_SCRIPT_DIR=\"$(PREFIX)/scripts\"
|
||||
CORE_CFLAGS += -DSWITCH_HTDOCS_DIR=\"$(PREFIX)/htdocs\"
|
||||
CORE_CFLAGS += -DSWITCH_GRAMMAR_DIR=\"$(PREFIX)/grammar\"
|
||||
|
||||
CORE_LDFLAGS = $(shell $(APR_CONFIG) --link-ld --libs )
|
||||
CORE_LDFLAGS += $(shell $(APU_CONFIG) --link-ld --libs )
|
||||
|
||||
lib_LTLIBRARIES = libfreeswitch.la
|
||||
libfreeswitch_la_CFLAGS = $(FIRST_INCLUDES) $(CORE_INCLUDES) $(AM_CFLAGS) $(CORE_CFLAGS)
|
||||
libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) $(CORE_LDFLAGS)
|
||||
libfreeswitch_la_LIBADD = -lteletone -lresample -lsrtp -lsqlite3 -lpcre
|
||||
nodist_libfreeswitch_la_SOURCES = src/include/switch_version.h
|
||||
|
||||
$(libfreeswitch_la_SOURCES): depends version
|
||||
|
||||
bin_PROGRAMS = freeswitch
|
||||
bin_SCRIPTS = scripts/fsxs
|
||||
freeswitch_SOURCES = src/switch.c\
|
||||
|
@ -123,9 +115,6 @@ freeswitch_SOURCES = src/switch.c\
|
|||
freeswitch_CFLAGS = $(AM_CFLAGS)
|
||||
freeswitch_LDADD = ${top_builddir}/libfreeswitch.la
|
||||
|
||||
|
||||
|
||||
|
||||
version: Makefile src/include/switch_version.h
|
||||
MAKE=$(MAKE) ./build/checkversion.sh
|
||||
|
||||
|
@ -153,7 +142,6 @@ depends:
|
|||
./build/buildlib.sh . install libresample --prefix=$(PREFIX)
|
||||
./build/buildlib.sh . install libteletone --prefix=$(PREFIX)
|
||||
./build/buildlib.sh . install srtp --prefix=$(PREFIX)
|
||||
# ./build/buildlib.sh . install libspeakup --prefix=$(PREFIX)
|
||||
./build/buildlib.sh . install pcre --prefix=$(PREFIX)
|
||||
rm build/freeswitch.env
|
||||
|
||||
|
|
|
@ -4,4 +4,4 @@ m4_include([build/config/ax_cc_maxopt.m4])
|
|||
m4_include([build/config/ax_check_compiler_flags.m4])
|
||||
m4_include([build/config/ac_gcc_archflag.m4])
|
||||
m4_include([build/config/ac_gcc_x86_cpuid.m4])
|
||||
|
||||
m4_include([libs/apr/build/apr_common.m4])
|
||||
|
|
138
configure.in
138
configure.in
|
@ -6,7 +6,8 @@ AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
|
|||
AC_CONFIG_AUX_DIR(build/config)
|
||||
AM_INIT_AUTOMAKE(libfreeswitch,0.1)
|
||||
AC_CONFIG_SRCDIR([src/switch.c])
|
||||
AC_CONFIG_HEADER([src/include/switch_am_config.h])
|
||||
AC_CONFIG_HEADER([src/include/switch_private.h])
|
||||
|
||||
|
||||
AC_PREFIX_DEFAULT(/usr/local/freeswitch)
|
||||
|
||||
|
@ -134,12 +135,145 @@ AC_CHECK_FUNCS([gethostname vasprintf mmap mlock mlockall usleep])
|
|||
|
||||
AC_C_BIGENDIAN(AC_DEFINE([SWITCH_BYTE_ORDER],__BIG_ENDIAN,[Big Endian]),AC_DEFINE([SWITCH_BYTE_ORDER],__LITTLE_ENDIAN,[Little Endian]))
|
||||
|
||||
# Checks for integer size
|
||||
AC_CHECK_SIZEOF(char, 1)
|
||||
AC_CHECK_SIZEOF(int, 4)
|
||||
AC_CHECK_SIZEOF(long, 4)
|
||||
AC_CHECK_SIZEOF(short, 2)
|
||||
AC_CHECK_SIZEOF(long long, 8)
|
||||
AC_TYPE_SIZE_T
|
||||
AC_CHECK_TYPE(ssize_t, int)
|
||||
|
||||
# Checks for pointer size
|
||||
AC_CHECK_SIZEOF(void*, 4)
|
||||
|
||||
if test "x$ac_cv_sizeof_voidp" != "x"; then
|
||||
voidp_size=$ac_cv_sizeof_voidp
|
||||
else
|
||||
AC_ERROR([Cannot determine size of void*])
|
||||
fi
|
||||
|
||||
if test "$ac_cv_sizeof_short" = "2"; then
|
||||
short_value=short
|
||||
fi
|
||||
if test "$ac_cv_sizeof_int" = "4"; then
|
||||
int_value=int
|
||||
fi
|
||||
|
||||
if test "$ac_cv_sizeof_int" = "8"; then
|
||||
int64_t_fmt='#define SWITCH_INT64_T_FMT "d"'
|
||||
uint64_t_fmt='#define SWITCH_UINT64_T_FMT "u"'
|
||||
int64_value="int"
|
||||
long_value=int
|
||||
elif test "$ac_cv_sizeof_long" = "8"; then
|
||||
int64_t_fmt='#define SWITCH_INT64_T_FMT "ld"'
|
||||
uint64_t_fmt='#define SWITCH_UINT64_T_FMT "lu"'
|
||||
int64_value="long"
|
||||
long_value=long
|
||||
elif test "$ac_cv_sizeof_long_long" = "8"; then
|
||||
int64_t_fmt='#define SWITCH_INT64_T_FMT "lld"'
|
||||
uint64_t_fmt='#define SWITCH_UINT64_T_FMT "llu"'
|
||||
int64_value="long long"
|
||||
long_value="long long"
|
||||
elif test "$ac_cv_sizeof_longlong" = "8"; then
|
||||
int64_t_fmt='#define SWITCH_INT64_T_FMT "qd"'
|
||||
uint64_t_fmt='#define SWITCH_UINT64_T_FMT "qu"'
|
||||
int64_value="__int64"
|
||||
long_value="__int64"
|
||||
else
|
||||
AC_ERROR([could not detect a 64-bit integer type])
|
||||
fi
|
||||
|
||||
if test "$ac_cv_type_size_t" = "yes"; then
|
||||
size_t_value="size_t"
|
||||
else
|
||||
size_t_value="switch_int32_t"
|
||||
fi
|
||||
|
||||
if test "$ac_cv_type_ssize_t" = "yes"; then
|
||||
ssize_t_value="ssize_t"
|
||||
else
|
||||
ssize_t_value="switch_int32_t"
|
||||
fi
|
||||
|
||||
APR_CHECK_SIZEOF_EXTENDED([#include <sys/types.h>], ssize_t, 8)
|
||||
|
||||
if test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_int"; then
|
||||
ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "d"'
|
||||
elif test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_long"; then
|
||||
ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "ld"'
|
||||
else
|
||||
ssize_t_fmt='#error Can not determine the proper size for ssize_t'
|
||||
fi
|
||||
|
||||
APR_CHECK_SIZEOF_EXTENDED([#include <stddef.h>], size_t, 8)
|
||||
|
||||
if test "$ac_cv_sizeof_size_t" = "$ac_cv_sizeof_int"; then
|
||||
size_t_fmt='#define SWITCH_SIZE_T_FMT "d"'
|
||||
elif test "$ac_cv_sizeof_size_t" = "$ac_cv_sizeof_long"; then
|
||||
size_t_fmt='#define SWITCH_SIZE_T_FMT "ld"'
|
||||
else
|
||||
size_t_fmt='#error Can not determine the proper size for size_t'
|
||||
fi
|
||||
|
||||
# Basically, we have tried to figure out the correct format strings
|
||||
# for SWITCH types which vary between platforms, but we don't always get
|
||||
# it right. If you find that we don't get it right for your platform,
|
||||
# you can override our decision below.
|
||||
# NOTE: borrowed much of this logic from apr.
|
||||
case $host in
|
||||
s390*linux*)
|
||||
# uniquely, the 31-bit Linux/s390 uses "unsigned long int"
|
||||
# for size_t rather than "unsigned int":
|
||||
size_t_fmt='#define SWITCH_SIZE_T_FMT "lu"'
|
||||
ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "ld"'
|
||||
;;
|
||||
*-os2*)
|
||||
size_t_fmt='#define SWITCH_SIZE_T_FMT "lu"'
|
||||
;;
|
||||
*aix4*|*aix5*)
|
||||
ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "ld"'
|
||||
size_t_fmt='#define SWITCH_SIZE_T_FMT "ld"'
|
||||
;;
|
||||
*beos*)
|
||||
ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "ld"'
|
||||
size_t_fmt='#define SWITCH_SIZE_T_FMT "ld"'
|
||||
;;
|
||||
*apple-darwin*)
|
||||
osver=`uname -r`
|
||||
case $osver in
|
||||
[0-7].*)
|
||||
ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "d"'
|
||||
;;
|
||||
*)
|
||||
ssize_t_fmt='#define SWITCH_SSIZE_T_FMT "ld"'
|
||||
;;
|
||||
esac
|
||||
size_t_fmt='#define SWITCH_SIZE_T_FMT "lu"'
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(voidp_size)
|
||||
AC_SUBST(short_value)
|
||||
AC_SUBST(int_value)
|
||||
AC_SUBST(long_value)
|
||||
AC_SUBST(int64_value)
|
||||
AC_SUBST(size_t_value)
|
||||
AC_SUBST(ssize_t_value)
|
||||
AC_SUBST(int64_t_fmt)
|
||||
AC_SUBST(uint64_t_fmt)
|
||||
AC_SUBST(ssize_t_fmt)
|
||||
AC_SUBST(size_t_fmt)
|
||||
|
||||
|
||||
|
||||
AC_ARG_ENABLE(crash-protection,
|
||||
[ --enable-crash-protection Compile with CRASH Protection],,[enable_crash_prot="no"])
|
||||
|
||||
AM_CONDITIONAL([CRASHPROT],[test "x$enable_crash_prot" != "xno"])
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_CONFIG_FILES([Makefile
|
||||
src/include/switch_am_config.h])
|
||||
|
||||
AM_CONDITIONAL(ISLINUX, [test `uname -s` = Linux])
|
||||
AM_CONDITIONAL(ISMAC, [test `uname -s` = Darwin])
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="./"
|
||||
PreprocessorDefinitions="_WIN32;WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBPCRE_EXPORTS;SUPPORT_UTF8;SUPPORT_UCP;POSIX_MALLOC_THRESHOLD=10;NO_RECURSE;DEBUG;PCRE_DEFINITION;DLL_EXPORT"
|
||||
PreprocessorDefinitions="_WIN32;WIN32;_DEBUG;_WINDOWS;LIBPCRE_EXPORTS;SUPPORT_UTF8;SUPPORT_UCP;POSIX_MALLOC_THRESHOLD=10;NO_RECURSE;DEBUG;PCRE_DEFINITION;PCRE_STATIC"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
|
@ -97,7 +97,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not exist "$(ProjectDir)..\..\include\" md "$(ProjectDir)..\..\include\"
xcopy "$(ProjectDir)..\..\pcre\pcre.h" "$(ProjectDir)..\..\include\" /C /D /Y
"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
@ -140,7 +140,7 @@
|
|||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="./"
|
||||
PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBPCRE_EXPORTS;SUPPORT_UTF8;SUPPORT_UCP;POSIX_MALLOC_THRESHOLD=10;NO_RECURSE;PCRE_DEFINITION;DLL_EXPORT"
|
||||
PreprocessorDefinitions="_WIN32;WIN32;NDEBUG;_WINDOWS;LIBPCRE_EXPORTS;SUPPORT_UTF8;SUPPORT_UCP;POSIX_MALLOC_THRESHOLD=10;NO_RECURSE;PCRE_DEFINITION;PCRE_STATIC"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
|
@ -183,7 +183,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not exist "$(ProjectDir)..\..\include\" md "$(ProjectDir)..\..\include\"
xcopy "$(ProjectDir)..\..\pcre\pcre.h" "$(ProjectDir)..\..\include\" /C /D /Y
"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
@ -285,7 +285,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not exist "$(ProjectDir)..\..\include\" md "$(ProjectDir)..\..\include\"
xcopy "$(ProjectDir)..\..\pcre\pcre.h" "$(ProjectDir)..\..\include\" /C /D /Y
"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
@ -386,7 +386,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not exist "$(ProjectDir)..\..\include\" md "$(ProjectDir)..\..\include\"
xcopy "$(ProjectDir)..\..\pcre\pcre.h" "$(ProjectDir)..\..\include\" /C /D /Y
"
|
||||
CommandLine=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -78,7 +78,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not exist "$(ProjectDir)..\..\include\" md "$(ProjectDir)..\..\include\"
xcopy "$(ProjectDir)..\..\sqlite\src\*.h" "$(ProjectDir)..\..\include\" /C /D /Y
xcopy "$(ProjectDir)*.h" "$(ProjectDir)..\..\include\" /C /D /Y

"
|
||||
CommandLine="
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
@ -142,7 +142,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not exist "$(ProjectDir)..\..\include\" md "$(ProjectDir)..\..\include\"
xcopy "$(ProjectDir)..\..\sqlite\src\*.h" "$(ProjectDir)..\..\include\" /C /D /Y
xcopy "$(ProjectDir)*.h" "$(ProjectDir)..\..\include\" /C /D /Y

"
|
||||
CommandLine="
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
@ -224,7 +224,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not exist "$(ProjectDir)..\..\include\" md "$(ProjectDir)..\..\include\"
xcopy "$(ProjectDir)..\..\sqlite\src\*.h" "$(ProjectDir)..\..\include\" /C /D /Y
xcopy "$(ProjectDir)*.h" "$(ProjectDir)..\..\include\" /C /D /Y

"
|
||||
CommandLine="
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
@ -299,7 +299,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="if not exist "$(ProjectDir)..\..\include\" md "$(ProjectDir)..\..\include\"
xcopy "$(ProjectDir)..\..\sqlite\src\*.h" "$(ProjectDir)..\..\include\" /C /D /Y
xcopy "$(ProjectDir)*.h" "$(ProjectDir)..\..\include\" /C /D /Y

"
|
||||
CommandLine="
"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
|
|
|
@ -51,12 +51,29 @@
|
|||
#define FREESWITCH_MIB ".1.3.6.1.4.1." FREESWITCH_PEN
|
||||
#define FREESWITCH_ITAD "543"
|
||||
|
||||
#include <switch_platform.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <assert.h>
|
||||
#include <setjmp.h>
|
||||
#include <switch_apr.h>
|
||||
#include <switch_sqlite.h>
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <switch_platform.h>
|
||||
#include <switch_types.h>
|
||||
#include <switch_apr.h>
|
||||
|
||||
#include <switch_core_db.h>
|
||||
#include <switch_regex.h>
|
||||
#include <switch_core.h>
|
||||
#include <switch_loadable_module.h>
|
||||
#include <switch_console.h>
|
||||
|
@ -74,7 +91,6 @@
|
|||
#include <switch_stun.h>
|
||||
#include <switch_log.h>
|
||||
#include <switch_xml.h>
|
||||
#include <pcre.h>
|
||||
|
||||
|
||||
/** \mainpage FreeSWITCH
|
||||
|
|
|
@ -1,131 +1,18 @@
|
|||
/* src/include/switch_am_config.h.in. Generated from configure.in by autoheader. */
|
||||
#ifndef SWITCH_AM_CONFIG_H
|
||||
#define SWITCH_AM_CONFIG_H
|
||||
|
||||
/* Enable extra debugging. */
|
||||
#undef DEBUG
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
#define SWITCH_INT_16 @short_value@
|
||||
#define SWITCH_INT_32 @int_value@
|
||||
#define SWITCH_INT_64 @long_value@
|
||||
#define SWITCH_SIZE_T @size_t_value@
|
||||
#define SWITCH_SSIZE_T @ssize_t_value@
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
#define SWITCH_SIZEOF_VOIDP @voidp_size@
|
||||
|
||||
/* Define to 1 if you have the `gethostname' function. */
|
||||
#undef HAVE_GETHOSTNAME
|
||||
@ssize_t_fmt@
|
||||
@size_t_fmt@
|
||||
@int64_t_fmt@
|
||||
@uint64_t_fmt@
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#undef HAVE_MALLOC
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `mlock' function. */
|
||||
#undef HAVE_MLOCK
|
||||
|
||||
/* Define to 1 if you have the `mlockall' function. */
|
||||
#undef HAVE_MLOCKALL
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strftime' function. */
|
||||
#undef HAVE_STRFTIME
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `usleep' function. */
|
||||
#undef HAVE_USLEEP
|
||||
|
||||
/* Define to 1 if you have the `vasprintf' function. */
|
||||
#undef HAVE_VASPRINTF
|
||||
|
||||
/* Enable Optimization. */
|
||||
#undef OPTIMZER
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Little Endian */
|
||||
#undef SWITCH_BYTE_ORDER
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
#undef TM_IN_SYS_TIME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* sunpro is bad at inline */
|
||||
#undef __inline__
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,378 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Anthony Minessale II <anthmct@yahoo.com>
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
*
|
||||
* switch_core_db.h -- Sqlite wrapper and extensions Header
|
||||
*
|
||||
*/
|
||||
/*! \file switch_core_db.h
|
||||
\brief Core DB Header
|
||||
*/
|
||||
#ifndef SWITCH_CORE_DB_H
|
||||
#define SWITCH_CORE_DB_H
|
||||
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
|
||||
/**
|
||||
* @defgroup switch_sqlite_top Brought To You By SQLite
|
||||
* @ingroup FREESWITCH
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup switch_core_db Database Routines
|
||||
* @ingroup switch_sqlite_top
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* Each open database is represented by an instance of the
|
||||
* following opaque structure.
|
||||
*/
|
||||
|
||||
typedef struct sqlite3 switch_core_db_t;
|
||||
typedef struct sqlite3_stmt switch_core_db_stmt_t;
|
||||
|
||||
typedef int (*switch_core_db_callback_func_t)(void *pArg, int argc, char **argv, char **columnNames);
|
||||
|
||||
/**
|
||||
* A function to close the database.
|
||||
*
|
||||
* Call this function with a pointer to a structure that was previously
|
||||
* returned from switch_core_db_open() and the corresponding database will by closed.
|
||||
*
|
||||
* All SQL statements prepared using switch_core_db_prepare()
|
||||
* must be deallocated using switch_core_db_finalize() before
|
||||
* this routine is called. Otherwise, SWITCH_CORE_DB_BUSY is returned and the
|
||||
* database connection remains open.
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t *db);
|
||||
|
||||
/**
|
||||
* Open the database file "filename". The "filename" is UTF-8
|
||||
* encoded. A switch_core_db_t* handle is returned in *Db, even
|
||||
* if an error occurs. If the database is opened (or created) successfully,
|
||||
* then SWITCH_CORE_DB_OK is returned. Otherwise an error code is returned. The
|
||||
* switch_core_db_errmsg() routine can be used to obtain
|
||||
* an English language description of the error.
|
||||
*
|
||||
* If the database file does not exist, then a new database is created.
|
||||
* The encoding for the database is UTF-8.
|
||||
*
|
||||
* Whether or not an error occurs when it is opened, resources associated
|
||||
* with the switch_core_db_t* handle should be released by passing it to
|
||||
* switch_core_db_close() when it is no longer required.
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_open(const char *filename, switch_core_db_t **ppDb);
|
||||
|
||||
/**
|
||||
* The next group of routines returns information about the information
|
||||
* in a single column of the current result row of a query. In every
|
||||
* case the first parameter is a pointer to the SQL statement that is being
|
||||
* executed (the switch_core_db_stmt_t* that was returned from switch_core_db_prepare()) and
|
||||
* the second argument is the index of the column for which information
|
||||
* should be returned. iCol is zero-indexed. The left-most column as an
|
||||
* index of 0.
|
||||
*
|
||||
* If the SQL statement is not currently point to a valid row, or if the
|
||||
* the colulmn index is out of range, the result is undefined.
|
||||
*
|
||||
* These routines attempt to convert the value where appropriate. For
|
||||
* example, if the internal representation is FLOAT and a text result
|
||||
* is requested, sprintf() is used internally to do the conversion
|
||||
* automatically. The following table details the conversions that
|
||||
* are applied:
|
||||
*
|
||||
* Internal Type Requested Type Conversion
|
||||
* ------------- -------------- --------------------------
|
||||
* NULL INTEGER Result is 0
|
||||
* NULL FLOAT Result is 0.0
|
||||
* NULL TEXT Result is an empty string
|
||||
* NULL BLOB Result is a zero-length BLOB
|
||||
* INTEGER FLOAT Convert from integer to float
|
||||
* INTEGER TEXT ASCII rendering of the integer
|
||||
* INTEGER BLOB Same as for INTEGER->TEXT
|
||||
* FLOAT INTEGER Convert from float to integer
|
||||
* FLOAT TEXT ASCII rendering of the float
|
||||
* FLOAT BLOB Same as FLOAT->TEXT
|
||||
* TEXT INTEGER Use atoi()
|
||||
* TEXT FLOAT Use atof()
|
||||
* TEXT BLOB No change
|
||||
* BLOB INTEGER Convert to TEXT then use atoi()
|
||||
* BLOB FLOAT Convert to TEXT then use atof()
|
||||
* BLOB TEXT Add a "\000" terminator if needed
|
||||
*
|
||||
* Return the value as UTF-8 text.
|
||||
*/
|
||||
SWITCH_DECLARE(const unsigned char *)switch_core_db_column_text(switch_core_db_stmt_t *stmt, int iCol);
|
||||
|
||||
/**
|
||||
* The first parameter is a compiled SQL statement. This function returns
|
||||
* the column heading for the Nth column of that statement, where N is the
|
||||
* second function parameter. The string returned is UTF-8.
|
||||
*/
|
||||
SWITCH_DECLARE(const char *)switch_core_db_column_name(switch_core_db_stmt_t *stmt, int N);
|
||||
|
||||
/**
|
||||
* Return the number of columns in the result set returned by the compiled
|
||||
* SQL statement. This routine returns 0 if pStmt is an SQL statement
|
||||
* that does not return data (for example an UPDATE).
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_column_count(switch_core_db_stmt_t *pStmt);
|
||||
|
||||
/**
|
||||
* Return a pointer to a UTF-8 encoded string describing in english the
|
||||
* error condition for the most recent switch_core_db_* API call. The returned
|
||||
* string is always terminated by an 0x00 byte.
|
||||
*
|
||||
* The string "not an error" is returned when the most recent API call was
|
||||
* successful.
|
||||
*/
|
||||
SWITCH_DECLARE(const char *)switch_core_db_errmsg(switch_core_db_t *db);
|
||||
|
||||
/**
|
||||
* A function to executes one or more statements of SQL.
|
||||
*
|
||||
* If one or more of the SQL statements are queries, then
|
||||
* the callback function specified by the 3rd parameter is
|
||||
* invoked once for each row of the query result. This callback
|
||||
* should normally return 0. If the callback returns a non-zero
|
||||
* value then the query is aborted, all subsequent SQL statements
|
||||
* are skipped and the switch_core_db_exec() function returns the SWITCH_CORE_DB_ABORT.
|
||||
*
|
||||
* The 4th parameter is an arbitrary pointer that is passed
|
||||
* to the callback function as its first parameter.
|
||||
*
|
||||
* The 2nd parameter to the callback function is the number of
|
||||
* columns in the query result. The 3rd parameter to the callback
|
||||
* is an array of strings holding the values for each column.
|
||||
* The 4th parameter to the callback is an array of strings holding
|
||||
* the names of each column.
|
||||
*
|
||||
* The callback function may be NULL, even for queries. A NULL
|
||||
* callback is not an error. It just means that no callback
|
||||
* will be invoked.
|
||||
*
|
||||
* If an error occurs while parsing or evaluating the SQL (but
|
||||
* not while executing the callback) then an appropriate error
|
||||
* message is written into memory obtained from malloc() and
|
||||
* *errmsg is made to point to that message. The calling function
|
||||
* is responsible for freeing the memory that holds the error
|
||||
* message. Use switch_core_db_free() for this. If errmsg==NULL,
|
||||
* then no error message is ever written.
|
||||
*
|
||||
* The return value is is SWITCH_CORE_DB_OK if there are no errors and
|
||||
* some other return code if there is an error. The particular
|
||||
* return value depends on the type of error.
|
||||
*
|
||||
* If the query could not be executed because a database file is
|
||||
* locked or busy, then this function returns SWITCH_CORE_DB_BUSY. (This
|
||||
* behavior can be modified somewhat using the sswitch_core_db_busy_handler()
|
||||
* and switch_core_db_busy_timeout() functions below.)
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t *db,
|
||||
const char *sql,
|
||||
switch_core_db_callback_func_t callback,
|
||||
void *data,
|
||||
char **errmsg);
|
||||
|
||||
/**
|
||||
* This function is called to delete a compiled
|
||||
* SQL statement obtained by a previous call to switch_core_db_prepare().
|
||||
* If the statement was executed successfully, or
|
||||
* not executed at all, then SWITCH_CORE_DB_OK is returned. If execution of the
|
||||
* statement failed then an error code is returned.
|
||||
*
|
||||
* This routine can be called at any point during the execution of the
|
||||
* virtual machine. If the virtual machine has not completed execution
|
||||
* when this routine is called, that is like encountering an error or
|
||||
* an interrupt. (See switch_core_db_interrupt().) Incomplete updates may be
|
||||
* rolled back and transactions cancelled, depending on the circumstances,
|
||||
* and the result code returned will be SWITCH_CORE_DB_ABORT.
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_finalize(switch_core_db_stmt_t *pStmt);
|
||||
|
||||
/**
|
||||
* To execute an SQL query, it must first be compiled into a byte-code
|
||||
* program using the following routine.
|
||||
*
|
||||
* The first parameter "db" is an SQLite database handle. The second
|
||||
* parameter "zSql" is the statement to be compiled, encoded as
|
||||
* UTF-8. If the next parameter, "nBytes", is less
|
||||
* than zero, then zSql is read up to the first nul terminator. If
|
||||
* "nBytes" is not less than zero, then it is the length of the string zSql
|
||||
* in bytes (not characters).
|
||||
*
|
||||
* *pzTail is made to point to the first byte past the end of the first
|
||||
* SQL statement in zSql. This routine only compiles the first statement
|
||||
* in zSql, so *pzTail is left pointing to what remains uncompiled.
|
||||
*
|
||||
* *ppStmt is left pointing to a compiled SQL statement that can be
|
||||
* executed using switch_core_db_step(). Or if there is an error, *ppStmt may be
|
||||
* set to NULL. If the input text contained no SQL (if the input is and
|
||||
* empty string or a comment) then *ppStmt is set to NULL.
|
||||
*
|
||||
* On success, SWITCH_CORE_DB_OK is returned. Otherwise an error code is returned.
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_prepare(switch_core_db_t *db,
|
||||
const char *zSql,
|
||||
int nBytes,
|
||||
switch_core_db_stmt_t **ppStmt,
|
||||
const char **pzTail);
|
||||
|
||||
/**
|
||||
* After an SQL query has been compiled with a call to either
|
||||
* switch_core_db_prepare(), then this function must be
|
||||
* called one or more times to execute the statement.
|
||||
*
|
||||
* The return value will be either SWITCH_CORE_DB_BUSY, SWITCH_CORE_DB_DONE,
|
||||
* SWITCH_CORE_DB_ROW, SWITCH_CORE_DB_ERROR, or SWITCH_CORE_DB_MISUSE.
|
||||
*
|
||||
* SWITCH_CORE_DB_BUSY means that the database engine attempted to open
|
||||
* a locked database and there is no busy callback registered.
|
||||
* Call switch_core_db_step() again to retry the open.
|
||||
*
|
||||
* SWITCH_CORE_DB_DONE means that the statement has finished executing
|
||||
* successfully. switch_core_db_step() should not be called again on this virtual
|
||||
* machine.
|
||||
*
|
||||
* If the SQL statement being executed returns any data, then
|
||||
* SWITCH_CORE_DB_ROW is returned each time a new row of data is ready
|
||||
* for processing by the caller. The values may be accessed using
|
||||
* the switch_core_db_column_*() functions described below. switch_core_db_step()
|
||||
* is called again to retrieve the next row of data.
|
||||
*
|
||||
* SWITCH_CORE_DB_ERROR means that a run-time error (such as a constraint
|
||||
* violation) has occurred. switch_core_db_step() should not be called again on
|
||||
* the VM. More information may be found by calling switch_core_db_errmsg().
|
||||
*
|
||||
* SWITCH_CORE_DB_MISUSE means that the this routine was called inappropriately.
|
||||
* Perhaps it was called on a virtual machine that had already been
|
||||
* finalized or on one that had previously returned SWITCH_CORE_DB_ERROR or
|
||||
* SWITCH_CORE_DB_DONE. Or it could be the case the the same database connection
|
||||
* is being used simulataneously by two or more threads.
|
||||
*/
|
||||
SWITCH_DECLARE(int) switch_core_db_step(switch_core_db_stmt_t *stmt);
|
||||
|
||||
/**
|
||||
* Call this routine to free the memory that switch_core_db_get_table() allocated.
|
||||
*/
|
||||
SWITCH_DECLARE(void) switch_core_db_free(char *z);
|
||||
|
||||
/** Return values for switch_core_db_exec() and switch_core_db_step()*/
|
||||
#define SWITCH_CORE_DB_OK 0 /* Successful result */
|
||||
/* beginning-of-error-codes */
|
||||
#define SWITCH_CORE_DB_ERROR 1 /* SQL error or missing database */
|
||||
#define SWITCH_CORE_DB_INTERNAL 2 /* NOT USED. Internal logic error in SQLite */
|
||||
#define SWITCH_CORE_DB_PERM 3 /* Access permission denied */
|
||||
#define SWITCH_CORE_DB_ABORT 4 /* Callback routine requested an abort */
|
||||
#define SWITCH_CORE_DB_BUSY 5 /* The database file is locked */
|
||||
#define SWITCH_CORE_DB_LOCKED 6 /* A table in the database is locked */
|
||||
#define SWITCH_CORE_DB_NOMEM 7 /* A malloc() failed */
|
||||
#define SWITCH_CORE_DB_READONLY 8 /* Attempt to write a readonly database */
|
||||
#define SWITCH_CORE_DB_INTERRUPT 9 /* Operation terminated by switch_core_db_interrupt()*/
|
||||
#define SWITCH_CORE_DB_IOERR 10 /* Some kind of disk I/O error occurred */
|
||||
#define SWITCH_CORE_DB_CORRUPT 11 /* The database disk image is malformed */
|
||||
#define SWITCH_CORE_DB_NOTFOUND 12 /* NOT USED. Table or record not found */
|
||||
#define SWITCH_CORE_DB_FULL 13 /* Insertion failed because database is full */
|
||||
#define SWITCH_CORE_DB_CANTOPEN 14 /* Unable to open the database file */
|
||||
#define SWITCH_CORE_DB_PROTOCOL 15 /* Database lock protocol error */
|
||||
#define SWITCH_CORE_DB_EMPTY 16 /* Database is empty */
|
||||
#define SWITCH_CORE_DB_SCHEMA 17 /* The database schema changed */
|
||||
#define SWITCH_CORE_DB_TOOBIG 18 /* NOT USED. Too much data for one row */
|
||||
#define SWITCH_CORE_DB_CONSTRAINT 19 /* Abort due to contraint violation */
|
||||
#define SWITCH_CORE_DB_MISMATCH 20 /* Data type mismatch */
|
||||
#define SWITCH_CORE_DB_MISUSE 21 /* Library used incorrectly */
|
||||
#define SWITCH_CORE_DB_NOLFS 22 /* Uses OS features not supported on host */
|
||||
#define SWITCH_CORE_DB_AUTH 23 /* Authorization denied */
|
||||
#define SWITCH_CORE_DB_FORMAT 24 /* Auxiliary database format error */
|
||||
#define SWITCH_CORE_DB_RANGE 25 /* 2nd parameter to switch_core_db_bind out of range */
|
||||
#define SWITCH_CORE_DB_NOTADB 26 /* File opened that is not a database file */
|
||||
#define SWITCH_CORE_DB_ROW 100 /* switch_core_db_step() has another row ready */
|
||||
#define SWITCH_CORE_DB_DONE 101 /* switch_core_db_step() has finished executing */
|
||||
/* end-of-error-codes */
|
||||
|
||||
|
||||
/** @} */
|
||||
/** @} */
|
||||
/**
|
||||
* This routine is a variant of the "sprintf()" from the
|
||||
* standard C library. The resulting string is written into memory
|
||||
* obtained from malloc() so that there is never a possiblity of buffer
|
||||
* overflow. This routine also implement some additional formatting
|
||||
* options that are useful for constructing SQL statements.
|
||||
*
|
||||
* The strings returned by this routine should be freed by calling
|
||||
* switch_core_db_free().
|
||||
*
|
||||
* All of the usual printf formatting options apply. In addition, there
|
||||
* is a "%q" option. %q works like %s in that it substitutes a null-terminated
|
||||
* string from the argument list. But %q also doubles every '\'' character.
|
||||
* %q is designed for use inside a string literal. By doubling each '\''
|
||||
* character it escapes that character and allows it to be inserted into
|
||||
* the string.
|
||||
*
|
||||
* For example, so some string variable contains text as follows:
|
||||
*
|
||||
* char *zText = "It's a happy day!";
|
||||
*
|
||||
* We can use this text in an SQL statement as follows:
|
||||
*
|
||||
* char *z = switch_core_db_mprintf("INSERT INTO TABLES('%q')", zText);
|
||||
* switch_core_db_exec(db, z, callback1, 0, 0);
|
||||
* switch_core_db_free(z);
|
||||
*
|
||||
* Because the %q format string is used, the '\'' character in zText
|
||||
* is escaped and the SQL generated is as follows:
|
||||
*
|
||||
* INSERT INTO table1 VALUES('It''s a happy day!')
|
||||
*
|
||||
* This is correct. Had we used %s instead of %q, the generated SQL
|
||||
* would have looked like this:
|
||||
*
|
||||
* INSERT INTO table1 VALUES('It's a happy day!');
|
||||
*
|
||||
* This second example is an SQL syntax error. As a general rule you
|
||||
* should always use %q instead of %s when inserting text into a string
|
||||
* literal.
|
||||
*/
|
||||
SWITCH_DECLARE(char *)switch_mprintf(const char *zFormat,...);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
|
||||
#endif
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
|
||||
*/
|
|
@ -221,13 +221,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *se
|
|||
switch_input_args_t *args,
|
||||
uint32_t limit);
|
||||
|
||||
/*!
|
||||
\brief Function to evaluate an expression against a string
|
||||
\param target The string to find a match in
|
||||
\param expression The regular expression to run against the string
|
||||
\return Boolean if a match was found or not
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_regex_match(char *target, char *expression);
|
||||
|
||||
/*!
|
||||
\brief Play a sound and gather digits with the number of retries specified if the user doesn't give digits in the set time
|
||||
|
|
|
@ -48,6 +48,7 @@ SWITCH_BEGIN_EXTERN_C
|
|||
#define __SWITCH_FUNC__ (const char *)__func__
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
|
||||
|
@ -62,7 +63,7 @@ SWITCH_BEGIN_EXTERN_C
|
|||
* C4512: assignment operator could not be generated
|
||||
* C4610: struct can never be instantiated - user defined constructor required
|
||||
*/
|
||||
#pragma warning(disable:4100 4200 4204 4706 4819 4132 4510 4512 4610)
|
||||
#pragma warning(disable:4100 4200 4204 4706 4819 4132 4510 4512 4610 4996)
|
||||
|
||||
#if (_MSC_VER >= 1400) // VC8+
|
||||
#ifndef _CRT_SECURE_NO_DEPRECATE
|
||||
|
@ -93,20 +94,21 @@ typedef __int32 int32_t;
|
|||
typedef __int64 int64_t;
|
||||
typedef unsigned long in_addr_t;
|
||||
#endif
|
||||
typedef int pid_t;
|
||||
typedef int uid_t;
|
||||
typedef int gid_t;
|
||||
#define PACKED
|
||||
#include <io.h>
|
||||
#define strcasecmp(s1, s2) stricmp(s1, s2)
|
||||
#define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)
|
||||
#else
|
||||
/* packed attribute */
|
||||
#ifndef PACKED
|
||||
#define PACKED __attribute__ ((__packed__))
|
||||
#endif
|
||||
#include <limits.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
#include <inttypes.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif // _MSC_VER
|
||||
|
||||
#ifndef __LITTLE_ENDIAN
|
||||
|
@ -124,6 +126,7 @@ typedef unsigned long in_addr_t;
|
|||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#if defined(SWITCH_CORE_DECLARE_STATIC)
|
||||
#define SWITCH_DECLARE(type) type __stdcall
|
||||
#define SWITCH_DECLARE_NONSTD(type) type __cdecl
|
||||
|
@ -152,11 +155,13 @@ typedef unsigned long in_addr_t;
|
|||
#ifndef S_IWUSR
|
||||
#define S_IWUSR _S_IWRITE
|
||||
#endif
|
||||
#define SWITCH_THREAD_FUNC __stdcall
|
||||
#else //not win32
|
||||
#define SWITCH_DECLARE(type) type
|
||||
#define SWITCH_DECLARE_NONSTD(type) type
|
||||
#define SWITCH_MOD_DECLARE(type) type
|
||||
#define SWITCH_DECLARE_DATA
|
||||
#define SWITCH_THREAD_FUNC
|
||||
#endif
|
||||
|
||||
#ifdef DOXYGEN
|
||||
|
@ -171,10 +176,115 @@ typedef unsigned long in_addr_t;
|
|||
#define PRINTF_FUNCTION(fmtstr,vars)
|
||||
#endif
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#ifdef SWITCH_INT32
|
||||
typedef SWITCH_INT32 switch_int32_t;
|
||||
#else
|
||||
typedef int32_t switch_int32_t;
|
||||
#endif
|
||||
|
||||
#ifdef SWITCH_SIZE_T
|
||||
typedef SWITCH_SIZE_T switch_size_t;
|
||||
#else
|
||||
typedef uintptr_t switch_size_t;
|
||||
#endif
|
||||
|
||||
#ifdef SWITCH_SSIZE_T
|
||||
typedef SWITCH_SSIZE_T switch_ssize_t;
|
||||
#else
|
||||
typedef intptr_t switch_ssize_t;
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#ifdef WIN64
|
||||
#define SWITCH_SSIZE_T_FMT "%I64d"
|
||||
#define SWITCH_SIZE_T_FMT "%I64d"
|
||||
#else
|
||||
#define SWITCH_SSIZE_T_FMT "%d"
|
||||
#define SWITCH_SIZE_T_FMT "%d"
|
||||
#endif
|
||||
|
||||
#define SWITCH_INT64_T_FMT "%I64d"
|
||||
#define SWITCH_UINT64_T_FMT "%I64u"
|
||||
|
||||
#else
|
||||
#ifndef SWITCH_SSIZE_T_FMT
|
||||
#define SWITCH_SSIZE_T_FMT (sizeof (switch_ssize_t) == sizeof (long) ? "%ld" : sizeof (switch_ssize_t) == sizeof (int) ? "%d" : "%lld")
|
||||
#endif
|
||||
|
||||
#ifndef SWITCH_SIZE_T_FMT
|
||||
#define SWITCH_SIZE_T_FMT (sizeof (switch_size_t) == sizeof (long) ? "%lu" : sizeof (switch_size_t) == sizeof (int) ? "%u" : "%llu")
|
||||
#endif
|
||||
|
||||
#ifndef SWITCH_INT64_T_FMT
|
||||
#define SWITCH_INT64_T_FMT (sizeof (long) == 8 ? "%ld" : "%lld")
|
||||
#endif
|
||||
|
||||
#ifndef SWITCH_UINT64_T_FMT
|
||||
#define SWITCH_UINT64_T_FMT (sizeof (long) == 8 ? "%lu" : "%llu")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#define SWITCH_TIME_T_FMT SWITCH_INT64_T_FMT
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
|
||||
/* these includes must be outside the extern "C" block on windows or it will break compatibility with c++ modules*/
|
||||
#ifdef WIN32
|
||||
/* Has windows.h already been included? If so, our preferences don't matter,
|
||||
* but we will still need the winsock things no matter what was included.
|
||||
* If not, include a restricted set of windows headers to our tastes.
|
||||
*/
|
||||
#ifndef _WINDOWS_
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#ifndef _WIN32_WINNT
|
||||
|
||||
/* Restrict the server to a subset of Windows NT 4.0 header files by default
|
||||
*/
|
||||
#define _WIN32_WINNT 0x0400
|
||||
#endif
|
||||
#ifndef NOUSER
|
||||
#define NOUSER
|
||||
#endif
|
||||
#ifndef NOMCX
|
||||
#define NOMCX
|
||||
#endif
|
||||
#ifndef NOIME
|
||||
#define NOIME
|
||||
#endif
|
||||
#include <windows.h>
|
||||
/*
|
||||
* Add a _very_few_ declarations missing from the restricted set of headers
|
||||
* (If this list becomes extensive, re-enable the required headers above!)
|
||||
* winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now
|
||||
*/
|
||||
#define SW_HIDE 0
|
||||
#ifndef _WIN32_WCE
|
||||
#include <winsock2.h>
|
||||
#include <mswsock.h>
|
||||
#include <ws2tcpip.h>
|
||||
#else
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
#endif /* !_WINDOWS_ */
|
||||
#include <process.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
#ifndef TRUE
|
||||
#define TRUE (!FALSE)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
/* src/include/switch_private.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Enable extra debugging. */
|
||||
#undef DEBUG
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `gethostname' function. */
|
||||
#undef HAVE_GETHOSTNAME
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
||||
to 0 otherwise. */
|
||||
#undef HAVE_MALLOC
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `mlock' function. */
|
||||
#undef HAVE_MLOCK
|
||||
|
||||
/* Define to 1 if you have the `mlockall' function. */
|
||||
#undef HAVE_MLOCKALL
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
#undef HAVE_MMAP
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strftime' function. */
|
||||
#undef HAVE_STRFTIME
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_DIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_SYS_NDIR_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `usleep' function. */
|
||||
#undef HAVE_USLEEP
|
||||
|
||||
/* Define to 1 if you have the `vasprintf' function. */
|
||||
#undef HAVE_VASPRINTF
|
||||
|
||||
/* Enable Optimization. */
|
||||
#undef OPTIMZER
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* The size of a `char', as computed by sizeof. */
|
||||
#undef SIZEOF_CHAR
|
||||
|
||||
/* The size of a `int', as computed by sizeof. */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The size of a `long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The size of a `long long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* The size of a `short', as computed by sizeof. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* The size of size_t */
|
||||
#undef SIZEOF_SIZE_T
|
||||
|
||||
/* The size of ssize_t */
|
||||
#undef SIZEOF_SSIZE_T
|
||||
|
||||
/* The size of a `void*', as computed by sizeof. */
|
||||
#undef SIZEOF_VOIDP
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Little Endian */
|
||||
#undef SWITCH_BYTE_ORDER
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
|
||||
#undef TM_IN_SYS_TIME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* sunpro is bad at inline */
|
||||
#undef __inline__
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to rpl_malloc if the replacement function should be used. */
|
||||
#undef malloc
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef ssize_t
|
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
*
|
||||
* switch_regex.h -- pcre wrapper and extensions Header
|
||||
*
|
||||
*/
|
||||
/*! \file switch_regex.h
|
||||
\brief Regex Header
|
||||
*/
|
||||
#ifndef SWITCH_REGEX_H
|
||||
#define SWITCH_REGEX_H
|
||||
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
|
||||
/**
|
||||
* @defgroup switch_regex
|
||||
* @ingroup FREESWITCH
|
||||
* @{
|
||||
*/
|
||||
|
||||
typedef struct real_pcre switch_regex_t;
|
||||
|
||||
SWITCH_DECLARE(switch_regex_t *) switch_regex_compile(const char *pattern,
|
||||
int options,
|
||||
const char **errorptr,
|
||||
int *erroroffset,
|
||||
const unsigned char *tables);
|
||||
|
||||
SWITCH_DECLARE(int) switch_regex_copy_substring(const char *subject,
|
||||
int *ovector,
|
||||
int stringcount,
|
||||
int stringnumber,
|
||||
char *buffer,
|
||||
int size);
|
||||
|
||||
SWITCH_DECLARE(void) switch_regex_free(void *data);
|
||||
|
||||
SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t **new_re, int *ovector, uint32_t olen);
|
||||
SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_count, char *data, char *field_data, char *substituted, uint32_t len, int *ovector);
|
||||
|
||||
/*!
|
||||
\brief Function to evaluate an expression against a string
|
||||
\param target The string to find a match in
|
||||
\param expression The regular expression to run against the string
|
||||
\return Boolean if a match was found or not
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_regex_match(char *target, char *expression);
|
||||
|
||||
#define switch_regex_safe_free(re) if (re) {\
|
||||
switch_regex_free(re);\
|
||||
re = NULL;\
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
|
||||
#endif
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
|
||||
*/
|
|
@ -45,7 +45,6 @@
|
|||
|
||||
#include <switch.h>
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
#include <stdlib.h>
|
||||
|
||||
/*!
|
||||
\defgroup resamp Audio Resample Functions
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#define SWITCH_TYPES_H
|
||||
|
||||
#include <switch.h>
|
||||
#include <ctype.h>
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
|
||||
#define SWITCH_SEQ_ESC "\033["
|
||||
|
@ -503,7 +502,6 @@ typedef enum {
|
|||
SCSMF_DYNAMIC = (1 << 0)
|
||||
} switch_core_session_message_flag_t;
|
||||
|
||||
#define SWITCH_UUID_FORMATTED_LENGTH APR_UUID_FORMATTED_LENGTH
|
||||
#define SWITCH_CHANNEL_LOG SWITCH_CHANNEL_ID_LOG, __FILE__, __SWITCH_FUNC__, __LINE__
|
||||
#define SWITCH_CHANNEL_LOG_CLEAN SWITCH_CHANNEL_ID_LOG_CLEAN, __FILE__, __SWITCH_FUNC__, __LINE__
|
||||
#define SWITCH_CHANNEL_EVENT SWITCH_CHANNEL_ID_EVENT, __FILE__, __SWITCH_FUNC__, __LINE__
|
||||
|
@ -944,6 +942,7 @@ typedef enum {
|
|||
SCSC_CHECK_RUNNING
|
||||
} switch_session_ctl_t;
|
||||
|
||||
typedef uint16_t switch_port_t;
|
||||
typedef uint8_t switch_payload_t;
|
||||
typedef struct switch_rtp switch_rtp_t;
|
||||
typedef struct switch_core_session_message switch_core_session_message_t;
|
||||
|
@ -1032,7 +1031,6 @@ typedef switch_status_t (*switch_say_callback_t)(switch_core_session_t *session,
|
|||
switch_say_type_t type,
|
||||
switch_say_method_t method,
|
||||
switch_input_args_t *args);
|
||||
typedef int (*switch_core_db_callback_func_t)(void *pArg, int argc, char **argv, char **columnNames);
|
||||
typedef switch_status_t (*switch_module_load_t) (switch_loadable_module_interface_t **, char *);
|
||||
typedef switch_status_t (*switch_module_reload_t) (void);
|
||||
typedef switch_status_t (*switch_module_pause_t) (void);
|
||||
|
|
|
@ -39,30 +39,15 @@
|
|||
#define SWITCH_UTILS_H
|
||||
|
||||
#include <switch.h>
|
||||
#include <pcre.h>
|
||||
|
||||
SWITCH_BEGIN_EXTERN_C
|
||||
|
||||
#ifndef snprintf
|
||||
#define snprintf apr_snprintf
|
||||
#endif
|
||||
#ifndef vsnprintf
|
||||
#define vsnprintf apr_vsnprintf
|
||||
#endif
|
||||
|
||||
#define switch_bytes_per_frame(rate, interval) ((uint32_t)((float)rate / (1000.0f / (float)interval)))
|
||||
|
||||
#define SWITCH_SMAX 32767
|
||||
#define SWITCH_SMIN -32768
|
||||
#define switch_normalize_to_16bit(n) if (n > SWITCH_SMAX) n = SWITCH_SMAX / 2; else if (n < SWITCH_SMIN) n = SWITCH_SMIN / 2;
|
||||
|
||||
SWITCH_DECLARE(char *) switch_get_addr(char *buf, switch_size_t len, switch_sockaddr_t *in);
|
||||
|
||||
SWITCH_DECLARE(apr_status_t) switch_socket_recvfrom(apr_sockaddr_t *from, apr_socket_t *sock,
|
||||
apr_int32_t flags, char *buf,
|
||||
apr_size_t *len);
|
||||
|
||||
|
||||
#define switch_codec2str(codec,buf,len) snprintf(buf, len, "%s@%uk@%ui", \
|
||||
codec->implementation->iananame, \
|
||||
codec->implementation->samples_per_second, \
|
||||
|
@ -133,10 +118,6 @@ SWITCH_DECLARE(unsigned char) switch_char_to_rfc2833(char key);
|
|||
*/
|
||||
#define is_dtmf(key) ((key > 47 && key < 58) || (key > 64 && key < 69) || (key > 96 && key < 101) || key == 35 || key == 42 || key == 87 || key == 119)
|
||||
|
||||
/*!
|
||||
\brief Duplicate a string
|
||||
*/
|
||||
#define switch_copy_string apr_cpystrn
|
||||
|
||||
/*!
|
||||
\brief Test for the existance of a flag on an arbitary object
|
||||
|
@ -209,13 +190,7 @@ switch_mutex_unlock(obj->flag_mutex);
|
|||
/*!
|
||||
\brief Wait a desired number of microseconds and yield the CPU
|
||||
*/
|
||||
#if defined(HAVE_USLEEP)
|
||||
#define switch_yield(ms) usleep(ms);
|
||||
#elif defined(WIN32)
|
||||
#define switch_yield(ms) Sleep((DWORD)((ms) / 1000));
|
||||
#else
|
||||
#define switch_yield(ms) apr_sleep(ms); //apr_thread_yield();
|
||||
#endif
|
||||
#define switch_yield(ms) switch_sleep(ms);
|
||||
|
||||
/*!
|
||||
\brief Converts a string representation of a date into a switch_time_t
|
||||
|
@ -252,16 +227,6 @@ SWITCH_DECLARE(unsigned int) switch_separate_string(char *buf, char delim, char
|
|||
*/
|
||||
SWITCH_DECLARE(char *) switch_escape_char(switch_memory_pool_t *pool, char *in, char *delim, char esc);
|
||||
|
||||
/*!
|
||||
\brief Create a set of file descriptors to poll
|
||||
\param poll the polfd to create
|
||||
\param sock the socket to add
|
||||
\param flags the flags to modify the behaviour
|
||||
\param pool the memory pool to use
|
||||
\return SWITCH_STATUS_SUCCESS when successful
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t *poll, switch_socket_t *sock, switch_int16_t flags, switch_memory_pool_t *pool);
|
||||
|
||||
/*!
|
||||
\brief Wait for a socket
|
||||
\param poll the pollfd to wait on
|
||||
|
@ -276,20 +241,12 @@ SWITCH_DECLARE(int) switch_socket_waitfor(switch_pollfd_t *poll, int ms);
|
|||
*/
|
||||
SWITCH_DECLARE(const char *) switch_cut_path(const char *in);
|
||||
|
||||
#define switch_clean_re(re) if (re) {\
|
||||
pcre_free(re);\
|
||||
re = NULL;\
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(char *) switch_string_replace(const char *string, const char *search, const char *replace);
|
||||
SWITCH_DECLARE(switch_status_t) switch_string_match(const char *string, size_t string_len, const char *search, size_t search_len);
|
||||
SWITCH_DECLARE(int) switch_perform_regex(char *field, char *expression, pcre **new_re, int *ovector, uint32_t olen);
|
||||
SWITCH_DECLARE(void) switch_perform_substitution(pcre *re, int match_count, char *data, char *field_data, char *substituted, uint32_t len, int *ovector);
|
||||
|
||||
#define SWITCH_READ_ACCEPTABLE(status) (status == SWITCH_STATUS_SUCCESS || status == SWITCH_STATUS_BREAK)
|
||||
SWITCH_DECLARE(size_t) switch_url_encode(char *url, char *buf, size_t len);
|
||||
SWITCH_DECLARE(char *) switch_url_decode(char *s);
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_exists(const char *filename);
|
||||
SWITCH_END_EXTERN_C
|
||||
|
||||
#endif
|
||||
|
|
|
@ -55,11 +55,7 @@
|
|||
|
||||
#ifndef _SWITCH_XML_H
|
||||
#define _SWITCH_XML_H
|
||||
#include <switch_types.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <fcntl.h>
|
||||
#include <switch.h>
|
||||
|
||||
|
||||
///\defgroup xml1 XML Library Functions
|
||||
|
|
|
@ -374,7 +374,7 @@ static switch_status_t strepoch_api_function(char *data, switch_core_session_t *
|
|||
out = switch_str_time(data);
|
||||
}
|
||||
|
||||
stream->write_function(stream, "%d", (uint32_t)apr_time_sec(out));
|
||||
stream->write_function(stream, "%d", (uint32_t)((out) / (int64_t)(1000000)) );
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -315,16 +315,16 @@ static void parse_rr(const struct dns_parse *p, enum_query_t *q, struct dns_rr *
|
|||
}
|
||||
|
||||
if (flags && service && regex && replace) {
|
||||
pcre *re = NULL;
|
||||
switch_regex_t *re = NULL;
|
||||
int proceed = 0, ovector[30];
|
||||
char substituted[1024] = "";
|
||||
char rbuf[1024] = "";
|
||||
char *uri;
|
||||
enum_route_t *route;
|
||||
|
||||
switch_clean_re(re);
|
||||
switch_regex_safe_free(re);
|
||||
|
||||
if ((proceed = switch_perform_regex(q->number, regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
if ((proceed = switch_regex_perform(q->number, regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
if (strchr(regex, '(')) {
|
||||
switch_perform_substitution(re, proceed, replace, q->number, substituted, sizeof(substituted), ovector);
|
||||
uri = substituted;
|
||||
|
@ -333,8 +333,8 @@ static void parse_rr(const struct dns_parse *p, enum_query_t *q, struct dns_rr *
|
|||
}
|
||||
|
||||
if ((route = (enum_route_t *) switch_core_hash_find(globals.routes, service))){
|
||||
switch_clean_re(re);
|
||||
if ((proceed = switch_perform_regex(uri, route->regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
switch_regex_safe_free(re);
|
||||
if ((proceed = switch_regex_perform(uri, route->regex, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
if (strchr(route->regex, '(')) {
|
||||
switch_perform_substitution(re, proceed, route->replace, uri, rbuf, sizeof(rbuf), ovector);
|
||||
uri = rbuf;
|
||||
|
@ -347,7 +347,7 @@ static void parse_rr(const struct dns_parse *p, enum_query_t *q, struct dns_rr *
|
|||
add_result(q, order, preference, service, uri);
|
||||
}
|
||||
|
||||
switch_clean_re(re);
|
||||
switch_regex_safe_free(re);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -63,7 +63,7 @@ static int parse_exten(switch_core_session_t *session, switch_xml_t xexten, swit
|
|||
char *do_break_a = NULL;
|
||||
char *expression = NULL;
|
||||
char *field_data = NULL;
|
||||
pcre *re = NULL;
|
||||
switch_regex_t *re = NULL;
|
||||
int ovector[30];
|
||||
break_t do_break_i = BREAK_ON_FALSE;
|
||||
|
||||
|
@ -118,7 +118,7 @@ static int parse_exten(switch_core_session_t *session, switch_xml_t xexten, swit
|
|||
field_data = "";
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "test conditions %s(%s) =~ /%s/\n", field, field_data, expression);
|
||||
if (!(proceed = switch_perform_regex(field_data, expression, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
if (!(proceed = switch_regex_perform(field_data, expression, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Regex mismatch\n");
|
||||
|
||||
for (xaction = switch_xml_child(xcond, "anti-action"); xaction; xaction = xaction->next) {
|
||||
|
@ -181,7 +181,7 @@ static int parse_exten(switch_core_session_t *session, switch_xml_t xexten, swit
|
|||
switch_safe_free(substituted);
|
||||
}
|
||||
|
||||
switch_clean_re(re);
|
||||
switch_regex_safe_free(re);
|
||||
|
||||
if (do_break_i == BREAK_ON_TRUE || do_break_i == BREAK_ALWAYS) {
|
||||
break;
|
||||
|
|
|
@ -363,7 +363,7 @@ static void pres_event_handler(switch_event_t *event)
|
|||
type, rpid, status, proto, from);
|
||||
|
||||
|
||||
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
char *errmsg;
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (struct mdl_profile *) val;
|
||||
|
@ -462,7 +462,7 @@ static void roster_event_handler(switch_event_t *event)
|
|||
sql = switch_mprintf("select *,'%q' from subscriptions", status ? status : "");
|
||||
}
|
||||
|
||||
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
char *errmsg;
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (struct mdl_profile *) val;
|
||||
|
@ -537,7 +537,7 @@ static void sign_off(void)
|
|||
sql = switch_mprintf("select * from subscriptions");
|
||||
|
||||
|
||||
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
char *errmsg;
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (struct mdl_profile *) val;
|
||||
|
|
|
@ -717,7 +717,7 @@ static void set_local_sdp(private_object_t *tech_pvt, char *ip, uint32_t port, c
|
|||
|
||||
snprintf(buf, sizeof(buf),
|
||||
"v=0\n"
|
||||
"o=FreeSWITCH %d%"APR_TIME_T_FMT" %d%"APR_TIME_T_FMT" IN IP4 %s\n"
|
||||
"o=FreeSWITCH %d%"SWITCH_TIME_T_FMT" %d%"SWITCH_TIME_T_FMT" IN IP4 %s\n"
|
||||
"s=FreeSWITCH\n"
|
||||
"c=IN IP4 %s\n"
|
||||
"t=0 0\n"
|
||||
|
@ -3219,13 +3219,13 @@ static char *get_auth_data(char *dbname, char *nonce, char *npassword, size_t le
|
|||
while (running < 5000) {
|
||||
int result = switch_core_db_step(stmt);
|
||||
|
||||
if (result == SQLITE_ROW) {
|
||||
if (result == SWITCH_CORE_DB_ROW) {
|
||||
if ((colcount = switch_core_db_column_count(stmt))) {
|
||||
switch_copy_string(npassword, (char *)switch_core_db_column_text(stmt, 0), len);
|
||||
ret = npassword;
|
||||
}
|
||||
break;
|
||||
} else if (result == SQLITE_BUSY) {
|
||||
} else if (result == SWITCH_CORE_DB_BUSY) {
|
||||
running++;
|
||||
switch_yield(1000);
|
||||
continue;
|
||||
|
@ -5639,7 +5639,7 @@ static void cancel_presence(void)
|
|||
void *val;
|
||||
|
||||
if ((sql = switch_mprintf("select 0,'unavailable','unavailable',* from sip_subscriptions where event='presence'"))) {
|
||||
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (sofia_profile_t *) val;
|
||||
if (!(profile->pflags & PFLAG_PRESENCE)) {
|
||||
|
@ -5773,7 +5773,7 @@ static void pres_event_handler(switch_event_t *event)
|
|||
sql = switch_mprintf("select 1,'%q','%q',* from sip_subscriptions where event='presence'", status, rpid);
|
||||
}
|
||||
|
||||
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (sofia_profile_t *) val;
|
||||
if (!(profile->pflags & PFLAG_PRESENCE)) {
|
||||
|
@ -5872,7 +5872,7 @@ static void pres_event_handler(switch_event_t *event)
|
|||
break;
|
||||
}
|
||||
|
||||
for (hi = switch_hash_first(apr_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_hash_first(switch_hash_pool_get(globals.profile_hash), globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (sofia_profile_t *) val;
|
||||
if (!(profile->pflags & PFLAG_PRESENCE)) {
|
||||
|
|
|
@ -117,7 +117,7 @@ struct woomera_event_queue {
|
|||
struct woomera_profile {
|
||||
char *name;
|
||||
switch_socket_t *woomera_socket;
|
||||
apr_thread_mutex_t *iolock;
|
||||
switch_mutex_t *iolock;
|
||||
char woomera_host[WOOMERA_STRLEN];
|
||||
switch_port_t woomera_port;
|
||||
char audio_ip[WOOMERA_STRLEN];
|
||||
|
@ -134,9 +134,9 @@ struct private_object {
|
|||
switch_codec_t read_codec;
|
||||
switch_codec_t write_codec;
|
||||
switch_core_session_t *session;
|
||||
switch_pollfd_t read_poll;
|
||||
switch_pollfd_t write_poll;
|
||||
switch_pollfd_t command_poll;
|
||||
switch_pollfd_t *read_poll;
|
||||
switch_pollfd_t *write_poll;
|
||||
switch_pollfd_t *command_poll;
|
||||
char databuf[SWITCH_RECCOMMENDED_BUFFER_SIZE];
|
||||
switch_mutex_t *iolock;
|
||||
switch_sockaddr_t *udpread;
|
||||
|
@ -306,7 +306,7 @@ static void woomera_socket_close(switch_socket_t **socket)
|
|||
static void udp_socket_close(struct private_object *tech_pvt)
|
||||
{
|
||||
if (tech_pvt->udp_socket) {
|
||||
apr_socket_shutdown(tech_pvt->udp_socket, APR_SHUTDOWN_READWRITE);
|
||||
switch_socket_shutdown(tech_pvt->udp_socket, SWITCH_SHUTDOWN_READWRITE);
|
||||
woomera_socket_close(&tech_pvt->udp_socket);
|
||||
}
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ static switch_status_t woomera_waitfor_read(switch_core_session_t *session, int
|
|||
tech_pvt = switch_core_session_get_private(session);
|
||||
assert(tech_pvt != NULL);
|
||||
|
||||
return switch_socket_waitfor(&tech_pvt->read_poll, ms) ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
|
||||
return switch_socket_waitfor(tech_pvt->read_poll, ms) ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status_t woomera_waitfor_write(switch_core_session_t *session, int ms, int stream_id)
|
||||
|
@ -375,7 +375,7 @@ static switch_status_t woomera_waitfor_write(switch_core_session_t *session, int
|
|||
assert(tech_pvt != NULL);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
// return switch_socket_waitfor(&tech_pvt->write_poll, ms);
|
||||
// return switch_socket_waitfor(tech_pvt->write_poll, ms);
|
||||
}
|
||||
|
||||
static switch_status_t woomera_read_frame(switch_core_session_t *session, switch_frame_t **frame, int timeout,
|
||||
|
|
|
@ -65,7 +65,7 @@ enum switch_mod_cdr_sql_types_t { CDR_INTEGER,CDR_STRING,CDR_DECIMAL,CDR_DOUBLE,
|
|||
#define STDCALL
|
||||
#endif
|
||||
|
||||
typedef apr_status_t (STDCALL *modcdr_time_convert_t)(apr_time_exp_t*,apr_time_t);
|
||||
typedef switch_status_t (STDCALL *modcdr_time_convert_t)(switch_time_exp_t*,switch_time_t);
|
||||
|
||||
class BaseCDR {
|
||||
public:
|
||||
|
|
|
@ -67,7 +67,7 @@ CsvCDR::CsvCDR(switch_mod_cdr_newchannel_t *newchannel) : BaseCDR(newchannel)
|
|||
convert_time(&tempcallend, callenddate);
|
||||
|
||||
// Format the times
|
||||
apr_size_t retsizecsd, retsizecad, retsizectd, retsizeced; //csd == callstartdate, cad == callanswerdate, ced == callenddate, ceff == callenddate_forfile
|
||||
switch_size_t retsizecsd, retsizecad, retsizectd, retsizeced; //csd == callstartdate, cad == callanswerdate, ced == callenddate, ceff == callenddate_forfile
|
||||
char format[] = "%Y-%m-%d %H:%M:%S";
|
||||
switch_strftime(formattedcallstartdate,&retsizecsd,sizeof(formattedcallstartdate),format,&tempcallstart);
|
||||
switch_strftime(formattedcallanswerdate,&retsizecad,sizeof(formattedcallanswerdate),format,&tempcallanswer);
|
||||
|
@ -213,7 +213,7 @@ void CsvCDR::open_file()
|
|||
|
||||
switch_time_exp_lt(&now_converted,now);
|
||||
|
||||
apr_size_t retsize;
|
||||
switch_size_t retsize;
|
||||
char format[] = "%Y-%m-%d-%H-%M-%S";
|
||||
char formatteddate[100];
|
||||
memset(formatteddate,0,100);
|
||||
|
|
|
@ -65,10 +65,10 @@ SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_bindings, globals.bindings)
|
|||
char *next, *cur;
|
||||
uint32_t count = 0;
|
||||
uint8_t custom = 0;
|
||||
apr_ssize_t hlen = APR_HASH_KEY_STRING;
|
||||
switch_ssize_t hlen = SWITCH_HASH_KEY_STRING;
|
||||
|
||||
gethostname(globals.hostname, sizeof(globals.hostname));
|
||||
globals.host_hash = apr_hashfunc_default(globals.hostname, &hlen);
|
||||
globals.host_hash = switch_hashfunc_default(globals.hostname, &hlen);
|
||||
globals.key_count = 0;
|
||||
|
||||
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
|
||||
|
@ -256,7 +256,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
|
|||
{
|
||||
int x = 0;
|
||||
|
||||
switch_socket_shutdown(globals.udp_socket, APR_SHUTDOWN_READWRITE);
|
||||
switch_socket_shutdown(globals.udp_socket, SWITCH_SHUTDOWN_READWRITE);
|
||||
globals.running = -1;
|
||||
while(x < 100000 && globals.running) {
|
||||
x++;
|
||||
|
|
|
@ -194,7 +194,7 @@ static void socket_function(switch_core_session_t *session, char *data)
|
|||
return;
|
||||
}
|
||||
|
||||
if (switch_socket_create(&new_sock, AF_INET, SOCK_STREAM, APR_PROTO_TCP, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||
if (switch_socket_create(&new_sock, AF_INET, SOCK_STREAM, SWITCH_PROTO_TCP, switch_core_session_get_pool(session)) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Error!\n");
|
||||
return;
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ static switch_loadable_module_interface_t event_socket_module_interface = {
|
|||
static void close_socket(switch_socket_t **sock) {
|
||||
switch_mutex_lock(listen_list.sock_mutex);
|
||||
if (*sock) {
|
||||
apr_socket_shutdown(*sock, APR_SHUTDOWN_READWRITE);
|
||||
switch_socket_shutdown(*sock, SWITCH_SHUTDOWN_READWRITE);
|
||||
switch_socket_close(*sock);
|
||||
*sock = NULL;
|
||||
}
|
||||
|
@ -449,7 +449,7 @@ static switch_status_t read_packet(listener_t *listener, switch_event_t **event,
|
|||
|
||||
|
||||
if (data) {
|
||||
snprintf(buf, sizeof(buf), "Content-Type: log/data\nContent-Length: %"APR_SSIZE_T_FMT"\n\n", strlen(data));
|
||||
snprintf(buf, sizeof(buf), "Content-Type: log/data\nContent-Length: %"SWITCH_SSIZE_T_FMT"\n\n", strlen(data));
|
||||
len = strlen(buf);
|
||||
switch_socket_send(listener->sock, buf, &len);
|
||||
len = strlen(data);
|
||||
|
@ -486,7 +486,7 @@ static switch_status_t read_packet(listener_t *listener, switch_event_t **event,
|
|||
|
||||
len = strlen(listener->ebuf);
|
||||
|
||||
snprintf(hbuf, sizeof(hbuf), "Content-Length: %"APR_SSIZE_T_FMT"\n"
|
||||
snprintf(hbuf, sizeof(hbuf), "Content-Length: %"SWITCH_SSIZE_T_FMT"\n"
|
||||
"Content-Type: text/event-%s\n"
|
||||
"\n", len, etype);
|
||||
|
||||
|
@ -558,7 +558,7 @@ static void *SWITCH_THREAD_FUNC api_exec(switch_thread_t *thread, void *obj)
|
|||
switch_size_t rlen, blen;
|
||||
char buf[1024] = "";
|
||||
rlen = strlen(reply);
|
||||
snprintf(buf, sizeof(buf), "Content-Type: api/response\nContent-Length: %"APR_SSIZE_T_FMT"\n\n", rlen);
|
||||
snprintf(buf, sizeof(buf), "Content-Type: api/response\nContent-Length: %"SWITCH_SSIZE_T_FMT"\n\n", rlen);
|
||||
blen = strlen(buf);
|
||||
switch_socket_send(acs->listener->sock, buf, &blen);
|
||||
switch_socket_send(acs->listener->sock, reply, &rlen);
|
||||
|
@ -1006,7 +1006,7 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
|
|||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Connection Open\n");
|
||||
|
||||
switch_socket_opt_set(listener->sock, APR_SO_NONBLOCK, TRUE);
|
||||
switch_socket_opt_set(listener->sock, SWITCH_SO_NONBLOCK, TRUE);
|
||||
switch_set_flag_locked(listener, LFLAG_RUNNING);
|
||||
add_listener(listener);
|
||||
|
||||
|
@ -1210,9 +1210,9 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
|
|||
|
||||
|
||||
for(;;) {
|
||||
rv = switch_sockaddr_info_get(&sa, prefs.ip, APR_INET, prefs.port, 0, pool);
|
||||
rv = switch_sockaddr_info_get(&sa, prefs.ip, SWITCH_INET, prefs.port, 0, pool);
|
||||
if (rv) goto fail;
|
||||
rv = switch_socket_create(&listen_list.sock, sa->family, SOCK_STREAM, APR_PROTO_TCP, pool);
|
||||
rv = switch_socket_create(&listen_list.sock, switch_sockaddr_get_family(sa), SOCK_STREAM, SWITCH_PROTO_TCP, pool);
|
||||
if (rv) goto sock_fail;
|
||||
rv = switch_socket_opt_set(listen_list.sock, SWITCH_SO_REUSEADDR, 1);
|
||||
if (rv) goto sock_fail;
|
||||
|
|
|
@ -438,9 +438,9 @@ static void js_error(JSContext *cx, const char *message, JSErrorReport *report)
|
|||
static switch_status_t sm_load_file(char *filename)
|
||||
{
|
||||
sm_loadable_module_t *module = NULL;
|
||||
apr_dso_handle_t *dso = NULL;
|
||||
apr_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
apr_dso_handle_sym_t function_handle = NULL;
|
||||
switch_dso_handle_t *dso = NULL;
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
switch_dso_handle_sym_t function_handle = NULL;
|
||||
spidermonkey_init_t spidermonkey_init = NULL;
|
||||
const sm_module_interface_t *module_interface = NULL, *mp;
|
||||
|
||||
|
@ -450,16 +450,16 @@ static switch_status_t sm_load_file(char *filename)
|
|||
|
||||
assert(filename != NULL);
|
||||
|
||||
status = apr_dso_load(&dso, filename, module_manager.pool);
|
||||
status = switch_dso_load(&dso, filename, module_manager.pool);
|
||||
|
||||
while (loading) {
|
||||
if (status != APR_SUCCESS) {
|
||||
apr_dso_error(dso, derr, sizeof(derr));
|
||||
if (status != SWITCH_STATUS_SUCCESS) {
|
||||
switch_dso_error(dso, derr, sizeof(derr));
|
||||
err = derr;
|
||||
break;
|
||||
}
|
||||
|
||||
status = apr_dso_sym(&function_handle, dso, "spidermonkey_init");
|
||||
status = switch_dso_sym(&function_handle, dso, "spidermonkey_init");
|
||||
spidermonkey_init = (spidermonkey_init_t)(intptr_t) function_handle;
|
||||
|
||||
if (spidermonkey_init == NULL) {
|
||||
|
|
|
@ -153,10 +153,10 @@ static JSBool db_next(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsv
|
|||
int running = 1;
|
||||
while (running < 5000) {
|
||||
int result = switch_core_db_step(dbo->stmt);
|
||||
if (result == SQLITE_ROW) {
|
||||
if (result == SWITCH_CORE_DB_ROW) {
|
||||
*rval = BOOLEAN_TO_JSVAL( JS_TRUE );
|
||||
break;
|
||||
} else if (result == SQLITE_BUSY) {
|
||||
} else if (result == SWITCH_CORE_DB_BUSY) {
|
||||
running++;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -134,13 +134,7 @@ static switch_status_t http_stream_write(switch_stream_handle_t *handle, const c
|
|||
char *data;
|
||||
|
||||
va_start(ap, fmt);
|
||||
#ifdef HAVE_VASPRINTF
|
||||
ret = vasprintf(&data, fmt, ap);
|
||||
#else
|
||||
if ((data = (char *) malloc(2048))) {
|
||||
vsnprintf(data, 2048, fmt, ap);
|
||||
}
|
||||
#endif
|
||||
ret = switch_vasprintf(&data, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
if (data) {
|
||||
|
|
|
@ -0,0 +1,675 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/F
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
*
|
||||
*
|
||||
* switch_apr.c -- apr wrappers and extensions
|
||||
*
|
||||
*/
|
||||
|
||||
#include <switch.h>
|
||||
#ifndef WIN32
|
||||
#include <switch_private.h>
|
||||
#endif
|
||||
|
||||
/* apr headers*/
|
||||
#include <apr.h>
|
||||
#include <apr_pools.h>
|
||||
#include <apr_hash.h>
|
||||
#include <apr_network_io.h>
|
||||
#include <apr_errno.h>
|
||||
#include <apr_thread_proc.h>
|
||||
#include <apr_portable.h>
|
||||
#include <apr_thread_mutex.h>
|
||||
#include <apr_thread_cond.h>
|
||||
#include <apr_thread_rwlock.h>
|
||||
#include <apr_file_io.h>
|
||||
#include <apr_poll.h>
|
||||
#include <apr_dso.h>
|
||||
#include <apr_strings.h>
|
||||
#define APR_WANT_STDIO
|
||||
#define APR_WANT_STRFUNC
|
||||
#include <apr_want.h>
|
||||
|
||||
/* apr_vformatter_buff_t definition*/
|
||||
#include <apr_lib.h>
|
||||
|
||||
/* apr-util headers */
|
||||
#include <apr_queue.h>
|
||||
#include <apr_uuid.h>
|
||||
|
||||
/* apr stubs */
|
||||
|
||||
/* Memory Pools */
|
||||
|
||||
SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t *p)
|
||||
{
|
||||
apr_pool_clear(p);
|
||||
}
|
||||
|
||||
/* Hash tables */
|
||||
|
||||
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_first(switch_memory_pool_t *p, switch_hash_t *ht)
|
||||
{
|
||||
return apr_hash_first(p, ht);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_hash_index_t *) switch_hash_next(switch_hash_index_t *ht)
|
||||
{
|
||||
return apr_hash_next(ht);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_hash_this(switch_hash_index_t *hi, const void **key, switch_ssize_t *klen, void **val)
|
||||
{
|
||||
apr_hash_this(hi, key, klen, val);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(unsigned int) switch_hashfunc_default(const char *key, switch_ssize_t *klen)
|
||||
{
|
||||
return apr_hashfunc_default(key, klen);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_memory_pool_t *) switch_hash_pool_get(switch_hash_t *ht)
|
||||
{
|
||||
return apr_hash_pool_get(ht);
|
||||
}
|
||||
|
||||
/* DSO functions */
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_dso_load(switch_dso_handle_t **res_handle,
|
||||
const char *path, switch_memory_pool_t *ctx)
|
||||
{
|
||||
return apr_dso_load(res_handle, path, ctx);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_dso_unload(switch_dso_handle_t *handle)
|
||||
{
|
||||
return apr_dso_unload(handle);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_dso_sym(switch_dso_handle_sym_t *ressym,
|
||||
switch_dso_handle_t *handle,
|
||||
const char *symname)
|
||||
{
|
||||
return apr_dso_sym(ressym, handle, symname);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(const char *) switch_dso_error(switch_dso_handle_t *dso, char *buf, size_t bufsize)
|
||||
{
|
||||
return apr_dso_error(dso, buf, bufsize);
|
||||
}
|
||||
|
||||
|
||||
/* string functions */
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_strftime(char *s,
|
||||
switch_size_t *retsize,
|
||||
switch_size_t max,
|
||||
const char *format,
|
||||
switch_time_exp_t *tm)
|
||||
{
|
||||
return apr_strftime(s, retsize, max, format, (apr_time_exp_t *)tm);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_snprintf(char *buf, switch_size_t len, const char *format, ...)
|
||||
{
|
||||
va_list ap;
|
||||
int ret;
|
||||
va_start(ap, format);
|
||||
ret = apr_vsnprintf(buf, len, format, ap);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_vsnprintf(char *buf, switch_size_t len, const char *format, va_list ap)
|
||||
{
|
||||
return apr_vsnprintf(buf, len, format, ap);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(char *) switch_copy_string(char *dst, const char *src, switch_size_t dst_size)
|
||||
{
|
||||
return apr_cpystrn(dst, src, dst_size);
|
||||
}
|
||||
|
||||
/* thread read write lock functions */
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_create(switch_thread_rwlock_t **rwlock,
|
||||
switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_thread_rwlock_create(rwlock, pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_destroy(switch_thread_rwlock_t *rwlock)
|
||||
{
|
||||
return apr_thread_rwlock_destroy(rwlock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_memory_pool_t *) switch_thread_rwlock_pool_get(switch_thread_rwlock_t *rwlock)
|
||||
{
|
||||
return apr_thread_rwlock_pool_get(rwlock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_rdlock(switch_thread_rwlock_t *rwlock)
|
||||
{
|
||||
return apr_thread_rwlock_rdlock(rwlock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_tryrdlock(switch_thread_rwlock_t *rwlock)
|
||||
{
|
||||
return apr_thread_rwlock_tryrdlock(rwlock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_wrlock(switch_thread_rwlock_t *rwlock)
|
||||
{
|
||||
return apr_thread_rwlock_wrlock(rwlock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_trywrlock(switch_thread_rwlock_t *rwlock)
|
||||
{
|
||||
return apr_thread_rwlock_trywrlock(rwlock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_rwlock_unlock(switch_thread_rwlock_t *rwlock)
|
||||
{
|
||||
return apr_thread_rwlock_unlock(rwlock);
|
||||
}
|
||||
|
||||
/* thread mutex functions */
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_init(switch_mutex_t **lock,
|
||||
unsigned int flags,
|
||||
switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_thread_mutex_create(lock, flags, pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_destroy(switch_mutex_t *lock)
|
||||
{
|
||||
return apr_thread_mutex_destroy(lock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_lock(switch_mutex_t *lock)
|
||||
{
|
||||
return apr_thread_mutex_lock(lock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_unlock(switch_mutex_t *lock)
|
||||
{
|
||||
return apr_thread_mutex_unlock(lock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_mutex_trylock(switch_mutex_t *lock)
|
||||
{
|
||||
return apr_thread_mutex_trylock(lock);
|
||||
}
|
||||
|
||||
/* time function stubs */
|
||||
|
||||
SWITCH_DECLARE(switch_time_t) switch_time_now(void)
|
||||
{
|
||||
return (switch_time_t)apr_time_now();
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_time_exp_gmt_get(switch_time_t *result, switch_time_exp_t *input)
|
||||
{
|
||||
return apr_time_exp_gmt_get(result, (apr_time_exp_t *)input);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_time_exp_get(switch_time_t *result, switch_time_exp_t *input)
|
||||
{
|
||||
return apr_time_exp_get(result, (apr_time_exp_t *)input);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_time_exp_lt(switch_time_exp_t *result, switch_time_t input)
|
||||
{
|
||||
return apr_time_exp_lt((apr_time_exp_t *)result, input);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_time_exp_gmt(switch_time_exp_t *result, switch_time_t input)
|
||||
{
|
||||
return apr_time_exp_gmt((apr_time_exp_t *)result, input);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_sleep(switch_interval_time_t t)
|
||||
{
|
||||
#if defined(HAVE_USLEEP)
|
||||
usleep(t);
|
||||
#elif defined(WIN32)
|
||||
Sleep((DWORD)((t) / 1000));
|
||||
#else
|
||||
apr_sleep(t);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_rfc822_date(char *date_str, switch_time_t t)
|
||||
{
|
||||
return apr_rfc822_date(date_str, t);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_time_t) switch_time_make(switch_time_t sec, int32_t usec)
|
||||
{
|
||||
return ((switch_time_t)(sec) * APR_USEC_PER_SEC + (switch_time_t)(usec));
|
||||
}
|
||||
|
||||
|
||||
/* Thread condition locks */
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_create(switch_thread_cond_t **cond, switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_thread_cond_create(cond, pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_wait(switch_thread_cond_t *cond, switch_mutex_t *mutex)
|
||||
{
|
||||
return apr_thread_cond_wait(cond, mutex);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_timedwait(switch_thread_cond_t *cond, switch_mutex_t *mutex, switch_interval_time_t timeout)
|
||||
{
|
||||
return apr_thread_cond_timedwait(cond, mutex, timeout);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_signal(switch_thread_cond_t *cond)
|
||||
{
|
||||
return apr_thread_cond_signal(cond);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_broadcast(switch_thread_cond_t *cond)
|
||||
{
|
||||
return apr_thread_cond_broadcast(cond);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_cond_destroy(switch_thread_cond_t *cond)
|
||||
{
|
||||
return apr_thread_cond_destroy(cond);
|
||||
}
|
||||
|
||||
/* file i/o stubs */
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_open(switch_file_t **newf, const char *fname, int32_t flag, switch_fileperms_t perm, switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_file_open(newf, fname, flag, perm, pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_seek(switch_file_t *thefile, switch_seek_where_t where, int64_t *offset)
|
||||
{
|
||||
apr_status_t rv;
|
||||
apr_off_t off = (apr_off_t)(*offset);
|
||||
rv = apr_file_seek(thefile, where, &off);
|
||||
*offset = (int64_t)off;
|
||||
return rv;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_close(switch_file_t *thefile)
|
||||
{
|
||||
return apr_file_close(thefile);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_remove(const char *path, switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_file_remove(path, pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_read(switch_file_t *thefile, void *buf, switch_size_t *nbytes)
|
||||
{
|
||||
return apr_file_read(thefile, buf, nbytes);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_write(switch_file_t *thefile, const void *buf, switch_size_t *nbytes)
|
||||
{
|
||||
return apr_file_write(thefile, buf, nbytes);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_exists(const char *filename)
|
||||
{
|
||||
int32_t wanted = APR_FINFO_TYPE;
|
||||
apr_finfo_t info = {0};
|
||||
if (filename) {
|
||||
apr_stat(&info, filename, wanted, NULL);
|
||||
if (info.filetype != APR_NOFILE) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
/* thread stubs */
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_threadattr_create(switch_threadattr_t **new_attr, switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_threadattr_create(new_attr, pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_threadattr_detach_set(switch_threadattr_t *attr, int32_t on)
|
||||
{
|
||||
return apr_threadattr_detach_set(attr, on);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_threadattr_stacksize_set(switch_threadattr_t *attr, switch_size_t stacksize)
|
||||
{
|
||||
return apr_threadattr_stacksize_set(attr, stacksize);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_thread_create(switch_thread_t **new_thread, switch_threadattr_t *attr, switch_thread_start_t func, void *data, switch_memory_pool_t *cont)
|
||||
{
|
||||
return apr_thread_create(new_thread, attr, func, data, cont);
|
||||
}
|
||||
|
||||
/* socket stubs */
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_create(switch_socket_t **new_sock, int family, int type, int protocol, switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_socket_create(new_sock, family, type, protocol, pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_shutdown(switch_socket_t *sock, switch_shutdown_how_e how)
|
||||
{
|
||||
return apr_socket_shutdown(sock, how);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_close(switch_socket_t *sock)
|
||||
{
|
||||
return apr_socket_close(sock);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_bind(switch_socket_t *sock, switch_sockaddr_t *sa)
|
||||
{
|
||||
return apr_socket_bind(sock, sa);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_listen(switch_socket_t *sock, int32_t backlog)
|
||||
{
|
||||
return apr_socket_listen(sock, backlog);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_accept(switch_socket_t **new_sock, switch_socket_t *sock, switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_socket_accept(new_sock, sock, pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_connect(switch_socket_t *sock, switch_sockaddr_t *sa)
|
||||
{
|
||||
return apr_socket_connect(sock, sa);
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_send(switch_socket_t *sock, const char *buf, switch_size_t *len)
|
||||
{
|
||||
return apr_socket_send(sock, buf, len);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_sendto(switch_socket_t *sock, switch_sockaddr_t *where, int32_t flags, const char *buf, switch_size_t *len)
|
||||
{
|
||||
return apr_socket_sendto(sock, where, flags, buf, len);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_recv(switch_socket_t *sock, char *buf, switch_size_t *len)
|
||||
{
|
||||
return apr_socket_recv(sock, buf, len);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_sockaddr_info_get(switch_sockaddr_t **sa, const char *hostname, int32_t family, switch_port_t port, int32_t flags, switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_sockaddr_info_get(sa, hostname, family, port, flags, pool);
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_opt_set(switch_socket_t *sock, int32_t opt, int32_t on)
|
||||
{
|
||||
return apr_socket_opt_set(sock, opt, on);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_timeout_set(switch_socket_t *sock, switch_interval_time_t t)
|
||||
{
|
||||
return apr_socket_timeout_set(sock, t);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_sockaddr_ip_get(char **addr, switch_sockaddr_t *sa)
|
||||
{
|
||||
return apr_sockaddr_ip_get(addr, sa);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_mcast_join(switch_socket_t *sock, switch_sockaddr_t *join, switch_sockaddr_t *iface, switch_sockaddr_t *source)
|
||||
{
|
||||
return apr_mcast_join(sock, join, iface, source);
|
||||
}
|
||||
|
||||
|
||||
/* socket functions */
|
||||
|
||||
SWITCH_DECLARE(char *) switch_get_addr(char *buf, switch_size_t len, switch_sockaddr_t *in)
|
||||
{
|
||||
return get_addr(buf, len, &in->sa.sin.sin_addr);
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(uint16_t) switch_sockaddr_get_port(switch_sockaddr_t *sa)
|
||||
{
|
||||
return sa->port;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int32_t) switch_sockaddr_get_family(switch_sockaddr_t *sa)
|
||||
{
|
||||
return sa->family;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_recvfrom(switch_sockaddr_t *from, switch_socket_t *sock,
|
||||
int32_t flags, char *buf,
|
||||
size_t *len)
|
||||
{
|
||||
apr_status_t r;
|
||||
|
||||
if ((r = apr_socket_recvfrom(from, sock, flags, buf, len)) == APR_SUCCESS) {
|
||||
from->port = ntohs(from->sa.sin.sin_port);
|
||||
/* from->ipaddr_ptr = &(from->sa.sin.sin_addr);
|
||||
* from->ipaddr_ptr = inet_ntoa(from->sa.sin.sin_addr);
|
||||
*/
|
||||
}
|
||||
|
||||
return r;
|
||||
|
||||
}
|
||||
|
||||
/* poll stubs */
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_pollset_create(switch_pollset_t **pollset,
|
||||
uint32_t size,
|
||||
switch_memory_pool_t *p,
|
||||
uint32_t flags)
|
||||
{
|
||||
return apr_pollset_create(pollset, size, p, flags);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_pollset_add(switch_pollset_t *pollset,
|
||||
const switch_pollfd_t *descriptor)
|
||||
{
|
||||
return apr_pollset_add(pollset, descriptor);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_poll(switch_pollfd_t *aprset,
|
||||
int32_t numsock,
|
||||
int32_t *nsds,
|
||||
switch_interval_time_t timeout)
|
||||
{
|
||||
return apr_poll(aprset, numsock, nsds, timeout);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t **poll, switch_socket_t *sock,
|
||||
int16_t flags, switch_memory_pool_t *pool)
|
||||
{
|
||||
switch_pollset_t *pollset;
|
||||
|
||||
void *ptr = NULL;
|
||||
|
||||
if ((ptr = apr_palloc(pool, sizeof(switch_pollfd_t))) == 0) {
|
||||
return SWITCH_STATUS_MEMERR;
|
||||
}
|
||||
|
||||
if (switch_pollset_create(&pollset, 1, pool, flags) != SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
memset(ptr, 0, sizeof(switch_pollfd_t));
|
||||
*poll = ptr;
|
||||
|
||||
(*poll)->desc_type = APR_POLL_SOCKET;
|
||||
(*poll)->reqevents = flags;
|
||||
(*poll)->desc.s = sock;
|
||||
(*poll)->client_data = sock;
|
||||
|
||||
if (switch_pollset_add(pollset, *poll) != SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* apr-util stubs */
|
||||
|
||||
/* UUID Handling (apr-util) */
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_uuid_format(char *buffer, const switch_uuid_t *uuid)
|
||||
{
|
||||
apr_uuid_format(buffer, (const apr_uuid_t *)uuid);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_uuid_get(switch_uuid_t *uuid)
|
||||
{
|
||||
apr_uuid_get((apr_uuid_t *)uuid);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_uuid_parse(switch_uuid_t *uuid, const char *uuid_str)
|
||||
{
|
||||
return apr_uuid_parse((apr_uuid_t *)uuid, uuid_str);
|
||||
}
|
||||
|
||||
|
||||
/* FIFO queues (apr-util) */
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_create(switch_queue_t **queue,
|
||||
unsigned int queue_capacity,
|
||||
switch_memory_pool_t *pool)
|
||||
{
|
||||
return apr_queue_create(queue, queue_capacity, pool);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(unsigned int) switch_queue_size(switch_queue_t *queue)
|
||||
{
|
||||
return apr_queue_size(queue);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_pop(switch_queue_t *queue, void **data)
|
||||
{
|
||||
return apr_queue_pop(queue, data);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_push(switch_queue_t *queue, void *data)
|
||||
{
|
||||
return apr_queue_push(queue, data);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_trypop(switch_queue_t *queue, void **data)
|
||||
{
|
||||
return apr_queue_trypop(queue, data);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_queue_trypush(switch_queue_t *queue, void *data)
|
||||
{
|
||||
return apr_queue_trypush(queue, data);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Utility functions */
|
||||
struct switch_vasprintf_data {
|
||||
apr_vformatter_buff_t vbuff;
|
||||
switch_size_t len;
|
||||
switch_size_t block_size;
|
||||
char *buf;
|
||||
};
|
||||
|
||||
static int vasprintf_flush(apr_vformatter_buff_t *buff)
|
||||
{
|
||||
struct switch_vasprintf_data *data = (struct switch_vasprintf_data *)buff;
|
||||
|
||||
char *temp;
|
||||
switch_size_t len = data->vbuff.curpos - data->buf;
|
||||
|
||||
if ((temp = realloc(data->buf, data->len + data->block_size))) {
|
||||
data->buf = temp;
|
||||
data->vbuff.curpos = data->buf + len;
|
||||
data->len = data->len + data->block_size;
|
||||
data->vbuff.endpos = data->buf + data->len;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
SWITCH_DECLARE(int) switch_vasprintf(char **buf, const char *format, va_list ap)
|
||||
{
|
||||
#if 0
|
||||
struct switch_vasprintf_data data;
|
||||
|
||||
data.block_size = 1024;
|
||||
data.buf = malloc(data.block_size);
|
||||
|
||||
if (data.buf == NULL) {
|
||||
*buf = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
data.vbuff.curpos = data.buf;
|
||||
data.vbuff.endpos = data.buf + data.block_size;
|
||||
|
||||
return apr_vformatter(vasprintf_flush, (apr_vformatter_buff_t *)&data, format, ap);
|
||||
#endif
|
||||
#ifdef HAVE_VASPRINTF
|
||||
return vasprintf(buf, format, ap);
|
||||
#else
|
||||
*buf = (char *) malloc(2048);
|
||||
return vsnprintf(*buf, 2048, format, ap);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
|
||||
*/
|
|
@ -48,13 +48,7 @@ SWITCH_DECLARE(switch_status_t) switch_console_stream_write(switch_stream_handle
|
|||
}
|
||||
|
||||
va_start(ap, fmt);
|
||||
#ifdef HAVE_VASPRINTF
|
||||
ret = vasprintf(&data, fmt, ap);
|
||||
#else
|
||||
if ((data = (char *) malloc(2048))) {
|
||||
ret = vsnprintf(data, 2048, fmt, ap);
|
||||
}
|
||||
#endif
|
||||
ret = switch_vasprintf(&data, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
if (data) {
|
||||
|
@ -145,12 +139,7 @@ SWITCH_DECLARE(void) switch_console_printf(switch_text_channel_t channel, const
|
|||
|
||||
handle = switch_core_data_channel(channel);
|
||||
|
||||
#ifdef HAVE_VASPRINTF
|
||||
ret = vasprintf(&data, fmt, ap);
|
||||
#else
|
||||
data = (char *) malloc(2048);
|
||||
ret = vsnprintf(data, 2048, fmt, ap);
|
||||
#endif
|
||||
ret = switch_vasprintf(&data, fmt, ap);
|
||||
va_end(ap);
|
||||
if (ret == -1) {
|
||||
fprintf(stderr, "Memory Error\n");
|
||||
|
|
|
@ -33,8 +33,31 @@
|
|||
*/
|
||||
|
||||
#include <switch.h>
|
||||
#include <stdio.h>
|
||||
#include <switch_version.h>
|
||||
#ifndef WIN32
|
||||
#include <switch_private.h>
|
||||
#endif
|
||||
|
||||
/* for apr_pool_create and apr_pool_destroy */
|
||||
/* functions only used in this file so not exposed */
|
||||
#include <apr_pools.h>
|
||||
|
||||
/* for apr_hash_make, apr_hash_pool_get, apr_hash_set */
|
||||
/* functions only used in this file so not exposed */
|
||||
#include <apr_hash.h>
|
||||
|
||||
/* for apr_pvsprintf */
|
||||
/* function only used in this file so not exposed */
|
||||
#include <apr_strings.h>
|
||||
|
||||
/* for apr_initialize and apr_terminate */
|
||||
/* function only used in this file so not exposed */
|
||||
#include <apr_general.h>
|
||||
|
||||
#include <apr_portable.h>
|
||||
typedef apr_os_thread_t switch_thread_id_t;
|
||||
#define switch_thread_self apr_os_thread_current
|
||||
|
||||
|
||||
#ifdef HAVE_MLOCKALL
|
||||
#include <sys/mman.h>
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
*
|
||||
*
|
||||
* switch_core_db.c -- sqlite wrapper and extensions
|
||||
*
|
||||
*/
|
||||
|
||||
#include <switch.h>
|
||||
#include <sqlite3.h>
|
||||
|
||||
SWITCH_DECLARE(int) switch_core_db_open(const char *filename, switch_core_db_t **ppDb)
|
||||
{
|
||||
return sqlite3_open(filename, ppDb);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_core_db_close(switch_core_db_t *db)
|
||||
{
|
||||
return sqlite3_close(db);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(const unsigned char *)switch_core_db_column_text(switch_core_db_stmt_t *stmt, int iCol)
|
||||
{
|
||||
return sqlite3_column_text(stmt, iCol);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(const char *)switch_core_db_column_name(switch_core_db_stmt_t *stmt, int N)
|
||||
{
|
||||
return sqlite3_column_name(stmt, N);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_core_db_column_count(switch_core_db_stmt_t *pStmt)
|
||||
{
|
||||
return sqlite3_column_count(pStmt);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(const char *)switch_core_db_errmsg(switch_core_db_t *db)
|
||||
{
|
||||
return sqlite3_errmsg(db);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_core_db_exec(switch_core_db_t *db,
|
||||
const char *sql,
|
||||
switch_core_db_callback_func_t callback,
|
||||
void *data,
|
||||
char **errmsg)
|
||||
{
|
||||
return sqlite3_exec(db, sql, callback, data, errmsg);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_core_db_finalize(switch_core_db_stmt_t *pStmt)
|
||||
{
|
||||
return sqlite3_finalize(pStmt);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_core_db_prepare(switch_core_db_t *db,
|
||||
const char *zSql,
|
||||
int nBytes,
|
||||
switch_core_db_stmt_t **ppStmt,
|
||||
const char **pzTail)
|
||||
{
|
||||
return sqlite3_prepare(db, zSql, nBytes, ppStmt, pzTail);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_core_db_step(switch_core_db_stmt_t *stmt)
|
||||
{
|
||||
return sqlite3_step(stmt);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_core_db_free(char *z)
|
||||
{
|
||||
sqlite3_free(z);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(char *)switch_mprintf(const char *zFormat,...)
|
||||
{
|
||||
va_list ap;
|
||||
char *z;
|
||||
va_start(ap, zFormat);
|
||||
z = sqlite3_vmprintf(zFormat, ap);
|
||||
va_end(ap);
|
||||
return z;
|
||||
}
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
|
||||
*/
|
|
@ -532,12 +532,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_add_body(switch_event_t *event, con
|
|||
va_list ap;
|
||||
if (fmt) {
|
||||
va_start(ap, fmt);
|
||||
#ifdef HAVE_VASPRINTF
|
||||
ret = vasprintf(&data, fmt, ap);
|
||||
#else
|
||||
data = (char *) malloc(2048);
|
||||
ret = vsnprintf(data, 2048, fmt, ap);
|
||||
#endif
|
||||
ret = switch_vasprintf(&data, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
if (ret == -1) {
|
||||
|
|
|
@ -92,10 +92,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
|
|||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
char *cmd = switch_event_get_header(event, "call-command");
|
||||
unsigned long cmd_hash;
|
||||
apr_ssize_t hlen = APR_HASH_KEY_STRING;
|
||||
unsigned long CMD_EXECUTE = apr_hashfunc_default("execute", &hlen);
|
||||
unsigned long CMD_HANGUP = apr_hashfunc_default("hangup", &hlen);
|
||||
unsigned long CMD_NOMEDIA = apr_hashfunc_default("nomedia", &hlen);
|
||||
switch_ssize_t hlen = SWITCH_HASH_KEY_STRING;
|
||||
unsigned long CMD_EXECUTE = switch_hashfunc_default("execute", &hlen);
|
||||
unsigned long CMD_HANGUP = switch_hashfunc_default("hangup", &hlen);
|
||||
unsigned long CMD_NOMEDIA = switch_hashfunc_default("nomedia", &hlen);
|
||||
|
||||
assert(channel != NULL);
|
||||
assert(event != NULL);
|
||||
|
@ -106,7 +106,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
|
|||
}
|
||||
|
||||
hlen = (switch_size_t) strlen(cmd);
|
||||
cmd_hash = apr_hashfunc_default(cmd, &hlen);
|
||||
cmd_hash = switch_hashfunc_default(cmd, &hlen);
|
||||
|
||||
switch_channel_set_flag(channel, CF_EVENT_PARSE);
|
||||
|
||||
|
@ -1476,50 +1476,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
|
|||
return status;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_regex_match(char *target, char *expression) {
|
||||
const char* error = NULL; //Used to hold any errors
|
||||
int error_offset = 0; //Holds the offset of an error
|
||||
pcre* pcre_prepared = NULL; //Holds the compiled regex
|
||||
int match_count = 0; //Number of times the regex was matched
|
||||
int offset_vectors[2]; //not used, but has to exist or pcre won't even try to find a match
|
||||
|
||||
//Compile the expression
|
||||
pcre_prepared = pcre_compile(expression, 0, &error, &error_offset, NULL);
|
||||
|
||||
//See if there was an error in the expression
|
||||
if (error != NULL) {
|
||||
//Clean up after ourselves
|
||||
if (pcre_prepared) {
|
||||
pcre_free(pcre_prepared);
|
||||
pcre_prepared = NULL;
|
||||
}
|
||||
|
||||
//Note our error
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Regular Expression Error expression[%s] error[%s] location[%d]\n", expression, error, error_offset);
|
||||
|
||||
//We definitely didn't match anything
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
//So far so good, run the regex
|
||||
match_count = pcre_exec(pcre_prepared, NULL, target, (int) strlen(target), 0, 0, offset_vectors, sizeof(offset_vectors) / sizeof(offset_vectors[0]));
|
||||
|
||||
//Clean up
|
||||
if (pcre_prepared) {
|
||||
pcre_free(pcre_prepared);
|
||||
pcre_prepared = NULL;
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "number of matches: %d\n", match_count);
|
||||
|
||||
//Was it a match made in heaven?
|
||||
if (match_count > 0) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
} else {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t *session,
|
||||
uint32_t min_digits,
|
||||
uint32_t max_digits,
|
||||
|
@ -4830,7 +4786,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
|
|||
char *pattern = (char *) switch_xml_attr(input, "pattern");
|
||||
|
||||
if (pattern) {
|
||||
pcre *re = NULL;
|
||||
switch_regex_t *re = NULL;
|
||||
int proceed = 0, ovector[30];
|
||||
char *substituted = NULL;
|
||||
uint32_t len = 0;
|
||||
|
@ -4838,7 +4794,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
|
|||
char *expanded = NULL;
|
||||
switch_xml_t match = NULL;
|
||||
|
||||
if ((proceed = switch_perform_regex(data, pattern, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
if ((proceed = switch_regex_perform(data, pattern, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
match = switch_xml_child(input, "match");
|
||||
} else {
|
||||
match = switch_xml_child(input, "nomatch");
|
||||
|
@ -4854,7 +4810,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
|
|||
len = (uint32_t)(strlen(data) + strlen(adata) + 10);
|
||||
if (!(substituted = malloc(len))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error!\n");
|
||||
switch_clean_re(re);
|
||||
switch_regex_safe_free(re);
|
||||
switch_safe_free(expanded);
|
||||
goto done;
|
||||
}
|
||||
|
@ -4907,7 +4863,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
|
|||
}
|
||||
}
|
||||
|
||||
switch_clean_re(re);
|
||||
switch_regex_safe_free(re);
|
||||
switch_safe_free(expanded);
|
||||
switch_safe_free(substituted);
|
||||
}
|
||||
|
@ -5111,25 +5067,25 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_generate_xml_cdr(switch_core_session_
|
|||
if (!(time_tag = switch_xml_add_child_d(x_times, "created_time", t_off++))) {
|
||||
goto error;
|
||||
}
|
||||
snprintf(tmp, sizeof(tmp), "%"APR_TIME_T_FMT, caller_profile->times->created);
|
||||
snprintf(tmp, sizeof(tmp), "%"SWITCH_TIME_T_FMT, caller_profile->times->created);
|
||||
switch_xml_set_txt_d(time_tag, tmp);
|
||||
|
||||
if (!(time_tag = switch_xml_add_child_d(x_times, "answered_time", t_off++))) {
|
||||
goto error;
|
||||
}
|
||||
snprintf(tmp, sizeof(tmp), "%"APR_TIME_T_FMT, caller_profile->times->answered);
|
||||
snprintf(tmp, sizeof(tmp), "%"SWITCH_TIME_T_FMT, caller_profile->times->answered);
|
||||
switch_xml_set_txt_d(time_tag, tmp);
|
||||
|
||||
if (!(time_tag = switch_xml_add_child_d(x_times, "hangup_time", t_off++))) {
|
||||
goto error;
|
||||
}
|
||||
snprintf(tmp, sizeof(tmp), "%"APR_TIME_T_FMT, caller_profile->times->hungup);
|
||||
snprintf(tmp, sizeof(tmp), "%"SWITCH_TIME_T_FMT, caller_profile->times->hungup);
|
||||
switch_xml_set_txt_d(time_tag, tmp);
|
||||
|
||||
if (!(time_tag = switch_xml_add_child_d(x_times, "transfer_time", t_off++))) {
|
||||
goto error;
|
||||
}
|
||||
snprintf(tmp, sizeof(tmp), "%"APR_TIME_T_FMT, caller_profile->times->transferred);
|
||||
snprintf(tmp, sizeof(tmp), "%"SWITCH_TIME_T_FMT, caller_profile->times->transferred);
|
||||
switch_xml_set_txt_d(time_tag, tmp);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,15 @@
|
|||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
#include <ctype.h>
|
||||
|
||||
/* for apr_pstrcat */
|
||||
#include <apr_strings.h>
|
||||
|
||||
/* for apr_env_get and apr_env_set */
|
||||
#include <apr_env.h>
|
||||
|
||||
/* for apr file and directory handling */
|
||||
#include <apr_file_io.h>
|
||||
|
||||
struct switch_loadable_module {
|
||||
char *filename;
|
||||
|
@ -360,11 +368,11 @@ static switch_status_t switch_loadable_module_process(char *key, switch_loadable
|
|||
static switch_status_t switch_loadable_module_load_file(char *filename, switch_loadable_module_t **new_module)
|
||||
{
|
||||
switch_loadable_module_t *module = NULL;
|
||||
apr_dso_handle_t *dso = NULL;
|
||||
switch_dso_handle_t *dso = NULL;
|
||||
apr_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
apr_dso_handle_sym_t load_function_handle = NULL;
|
||||
apr_dso_handle_sym_t shutdown_function_handle = NULL;
|
||||
apr_dso_handle_sym_t runtime_function_handle = NULL;
|
||||
switch_dso_handle_sym_t load_function_handle = NULL;
|
||||
switch_dso_handle_sym_t shutdown_function_handle = NULL;
|
||||
switch_dso_handle_sym_t runtime_function_handle = NULL;
|
||||
switch_module_load_t load_func_ptr = NULL;
|
||||
int loading = 1;
|
||||
const char *err = NULL;
|
||||
|
@ -374,16 +382,16 @@ static switch_status_t switch_loadable_module_load_file(char *filename, switch_l
|
|||
assert(filename != NULL);
|
||||
|
||||
*new_module = NULL;
|
||||
status = apr_dso_load(&dso, filename, loadable_modules.pool);
|
||||
status = switch_dso_load(&dso, filename, loadable_modules.pool);
|
||||
|
||||
while (loading) {
|
||||
if (status != APR_SUCCESS) {
|
||||
apr_dso_error(dso, derr, sizeof(derr));
|
||||
switch_dso_error(dso, derr, sizeof(derr));
|
||||
err = derr;
|
||||
break;
|
||||
}
|
||||
|
||||
status = apr_dso_sym(&load_function_handle, dso, "switch_module_load");
|
||||
status = switch_dso_sym(&load_function_handle, dso, "switch_module_load");
|
||||
load_func_ptr = (switch_module_load_t)(intptr_t) load_function_handle;
|
||||
|
||||
if (load_func_ptr == NULL) {
|
||||
|
@ -414,9 +422,9 @@ static switch_status_t switch_loadable_module_load_file(char *filename, switch_l
|
|||
module->module_interface = module_interface;
|
||||
module->switch_module_load = load_func_ptr;
|
||||
|
||||
apr_dso_sym(&shutdown_function_handle, dso, "switch_module_shutdown");
|
||||
switch_dso_sym(&shutdown_function_handle, dso, "switch_module_shutdown");
|
||||
module->switch_module_shutdown = (switch_module_shutdown_t)(intptr_t) shutdown_function_handle;
|
||||
apr_dso_sym(&runtime_function_handle, dso, "switch_module_runtime");
|
||||
switch_dso_sym(&runtime_function_handle, dso, "switch_module_runtime");
|
||||
module->switch_module_runtime = (switch_module_runtime_t)(intptr_t) runtime_function_handle;
|
||||
|
||||
module->lib = dso;
|
||||
|
@ -700,7 +708,7 @@ SWITCH_DECLARE(void) switch_loadable_module_shutdown(void)
|
|||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Stopping: %s\n", module->module_interface->module_name);
|
||||
if (module->switch_module_shutdown() == SWITCH_STATUS_UNLOAD) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "%s unloaded.\n", module->module_interface->module_name);
|
||||
apr_dso_unload(module->lib);
|
||||
switch_dso_unload(module->lib);
|
||||
module->lib = NULL;
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "%s shutdown.\n", module->module_interface->module_name);
|
||||
|
|
|
@ -193,12 +193,7 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, const char
|
|||
fmt = new_fmt;
|
||||
}
|
||||
|
||||
#ifdef HAVE_VASPRINTF
|
||||
ret = vasprintf(&data, fmt, ap);
|
||||
#else
|
||||
data = (char *) malloc(2048);
|
||||
ret = vsnprintf(data, 2048, fmt, ap);
|
||||
#endif
|
||||
ret = switch_vasprintf(&data, fmt, ap);
|
||||
va_end(ap);
|
||||
if (ret == -1) {
|
||||
fprintf(stderr, "Memory Error\n");
|
||||
|
|
|
@ -0,0 +1,200 @@
|
|||
/*
|
||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||
*
|
||||
* Version: MPL 1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
* Portions created by the Initial Developer are Copyright (C)
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Michael Jerris <mike@jerris.com>
|
||||
*
|
||||
*
|
||||
* switch_regex.c -- PCRE wrapper
|
||||
*
|
||||
*/
|
||||
|
||||
#include <switch.h>
|
||||
#include <pcre.h>
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_regex_t *) switch_regex_compile(const char *pattern,
|
||||
int options,
|
||||
const char **errorptr,
|
||||
int *erroroffset,
|
||||
const unsigned char *tables)
|
||||
{
|
||||
return pcre_compile(pattern, options, errorptr, erroroffset, tables);
|
||||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_regex_copy_substring(const char *subject,
|
||||
int *ovector,
|
||||
int stringcount,
|
||||
int stringnumber,
|
||||
char *buffer,
|
||||
int size)
|
||||
{
|
||||
return pcre_copy_substring(subject, ovector, stringcount, stringnumber, buffer, size);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_regex_free(void *data)
|
||||
{
|
||||
pcre_free(data);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_regex_perform(char *field, char *expression, switch_regex_t **new_re, int *ovector, uint32_t olen)
|
||||
{
|
||||
const char *error = NULL;
|
||||
int erroffset = 0;
|
||||
pcre *re = NULL;
|
||||
int match_count = 0;
|
||||
|
||||
if (!(field && expression)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
re = pcre_compile(expression, /* the pattern */
|
||||
0, /* default options */
|
||||
&error, /* for error message */
|
||||
&erroffset, /* for error offset */
|
||||
NULL); /* use default character tables */
|
||||
if (error) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "COMPILE ERROR: %d [%s]\n", erroffset, error);
|
||||
switch_regex_safe_free(re);
|
||||
return 0;
|
||||
}
|
||||
|
||||
match_count = pcre_exec(re, /* result of pcre_compile() */
|
||||
NULL, /* we didn't study the pattern */
|
||||
field, /* the subject string */
|
||||
(int) strlen(field), /* the length of the subject string */
|
||||
0, /* start at offset 0 in the subject */
|
||||
0, /* default options */
|
||||
ovector, /* vector of integers for substring information */
|
||||
olen); /* number of elements (NOT size in bytes) */
|
||||
|
||||
if (match_count <= 0) {
|
||||
switch_regex_safe_free(re);
|
||||
match_count = 0;
|
||||
}
|
||||
|
||||
*new_re = (switch_regex_t *)re;
|
||||
|
||||
return match_count;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_perform_substitution(switch_regex_t *re, int match_count, char *data, char *field_data, char *substituted, uint32_t len, int *ovector)
|
||||
{
|
||||
char index[10] = "";
|
||||
char replace[1024] = "";
|
||||
uint32_t x, y = 0, z = 0, num = 0;
|
||||
|
||||
for (x = 0; x < (len-1) && x < strlen(data);) {
|
||||
if (data[x] == '$') {
|
||||
x++;
|
||||
|
||||
if (!(data[x] > 47 && data[x] < 58)) {
|
||||
substituted[y++] = data[x-1];
|
||||
continue;
|
||||
}
|
||||
|
||||
while (data[x] > 47 && data[x] < 58) {
|
||||
index[z++] = data[x];
|
||||
x++;
|
||||
}
|
||||
index[z++] = '\0';
|
||||
z = 0;
|
||||
num = atoi(index);
|
||||
|
||||
if (pcre_copy_substring(field_data,
|
||||
ovector,
|
||||
match_count,
|
||||
num,
|
||||
replace,
|
||||
sizeof(replace)) > 0) {
|
||||
unsigned int r;
|
||||
for (r = 0; r < strlen(replace); r++) {
|
||||
substituted[y++] = replace[r];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
substituted[y++] = data[x];
|
||||
x++;
|
||||
}
|
||||
}
|
||||
substituted[y++] = '\0';
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_regex_match(char *target, char *expression) {
|
||||
const char* error = NULL; //Used to hold any errors
|
||||
int error_offset = 0; //Holds the offset of an error
|
||||
pcre* pcre_prepared = NULL; //Holds the compiled regex
|
||||
int match_count = 0; //Number of times the regex was matched
|
||||
int offset_vectors[2]; //not used, but has to exist or pcre won't even try to find a match
|
||||
|
||||
//Compile the expression
|
||||
pcre_prepared = pcre_compile(expression, 0, &error, &error_offset, NULL);
|
||||
|
||||
//See if there was an error in the expression
|
||||
if (error != NULL) {
|
||||
//Clean up after ourselves
|
||||
if (pcre_prepared) {
|
||||
pcre_free(pcre_prepared);
|
||||
pcre_prepared = NULL;
|
||||
}
|
||||
|
||||
//Note our error
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Regular Expression Error expression[%s] error[%s] location[%d]\n", expression, error, error_offset);
|
||||
|
||||
//We definitely didn't match anything
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
//So far so good, run the regex
|
||||
match_count = pcre_exec(pcre_prepared, NULL, target, (int) strlen(target), 0, 0, offset_vectors, sizeof(offset_vectors) / sizeof(offset_vectors[0]));
|
||||
|
||||
//Clean up
|
||||
if (pcre_prepared) {
|
||||
pcre_free(pcre_prepared);
|
||||
pcre_prepared = NULL;
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "number of matches: %d\n", match_count);
|
||||
|
||||
//Was it a match made in heaven?
|
||||
if (match_count > 0) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
} else {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
* indent-tabs-mode:t
|
||||
* tab-width:4
|
||||
* c-basic-offset:4
|
||||
* End:
|
||||
* For VIM:
|
||||
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
|
||||
*/
|
|
@ -242,7 +242,7 @@ static void handle_ice(switch_rtp_t *rtp_session, void *data, switch_size_t len)
|
|||
remote_ip = switch_get_addr(ipbuf, sizeof(ipbuf), rtp_session->from_addr);
|
||||
|
||||
|
||||
switch_stun_packet_attribute_add_binded_address(rpacket, remote_ip, rtp_session->from_addr->port);
|
||||
switch_stun_packet_attribute_add_binded_address(rpacket, remote_ip, switch_sockaddr_get_port(rtp_session->from_addr));
|
||||
bytes = switch_stun_packet_length(rpacket);
|
||||
switch_socket_sendto(rtp_session->sock, rtp_session->from_addr, 0, (void*)rpacket, &bytes);
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_set_local_address(switch_rtp_t *rtp_s
|
|||
new_sock = NULL;
|
||||
|
||||
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_USE_TIMER) || switch_test_flag(rtp_session, SWITCH_RTP_FLAG_NOBLOCK)) {
|
||||
switch_socket_opt_set(rtp_session->sock, APR_SO_NONBLOCK, TRUE);
|
||||
switch_socket_opt_set(rtp_session->sock, SWITCH_SO_NONBLOCK, TRUE);
|
||||
switch_set_flag_locked(rtp_session, SWITCH_RTP_FLAG_NOBLOCK);
|
||||
}
|
||||
|
||||
|
@ -566,7 +566,7 @@ SWITCH_DECLARE(void) switch_rtp_kill_socket(switch_rtp_t *rtp_session)
|
|||
switch_mutex_lock(rtp_session->flag_mutex);
|
||||
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_IO)) {
|
||||
assert(rtp_session->sock != NULL);
|
||||
apr_socket_shutdown(rtp_session->sock, APR_SHUTDOWN_READWRITE);
|
||||
switch_socket_shutdown(rtp_session->sock, SWITCH_SHUTDOWN_READWRITE);
|
||||
switch_clear_flag(rtp_session, SWITCH_RTP_FLAG_IO);
|
||||
}
|
||||
switch_mutex_unlock(rtp_session->flag_mutex);
|
||||
|
@ -869,21 +869,21 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
|||
|
||||
|
||||
if (rtp_session->recv_msg.header.version) {
|
||||
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ) && rtp_session->from_addr->port) {
|
||||
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ) && switch_sockaddr_get_port(rtp_session->from_addr)) {
|
||||
char *tx_host;
|
||||
char *old_host;
|
||||
char bufa[30], bufb[30];
|
||||
tx_host = switch_get_addr(bufa, sizeof(bufa), rtp_session->from_addr);
|
||||
old_host = switch_get_addr(bufb, sizeof(bufb), rtp_session->remote_addr);
|
||||
|
||||
if ((rtp_session->from_addr->port != rtp_session->remote_port) || strcmp(tx_host, old_host)) {
|
||||
if ((switch_sockaddr_get_port(rtp_session->from_addr) != rtp_session->remote_port) || strcmp(tx_host, old_host)) {
|
||||
const char *err;
|
||||
uint32_t old = rtp_session->remote_port;
|
||||
|
||||
if (!switch_strlen_zero(tx_host) && rtp_session->from_addr->port > 0) {
|
||||
if (!switch_strlen_zero(tx_host) && switch_sockaddr_get_port(rtp_session->from_addr) > 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Auto Changing port from %s:%u to %s:%u\n",
|
||||
old_host, old, tx_host, rtp_session->from_addr->port);
|
||||
switch_rtp_set_remote_address(rtp_session, tx_host, rtp_session->from_addr->port, &err);
|
||||
old_host, old, tx_host, switch_sockaddr_get_port(rtp_session->from_addr));
|
||||
switch_rtp_set_remote_address(rtp_session, tx_host, switch_sockaddr_get_port(rtp_session->from_addr), &err);
|
||||
}
|
||||
}
|
||||
switch_clear_flag_locked(rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
|
||||
|
|
|
@ -100,7 +100,7 @@ SWITCH_DECLARE(void) switch_stun_random_string(char *buf, uint16_t len, char *se
|
|||
|
||||
max = (int)strlen(set);
|
||||
|
||||
srand((unsigned int)apr_time_now());
|
||||
srand((unsigned int)switch_time_now());
|
||||
|
||||
for(x = 0; x < len; x++) {
|
||||
int j = (int)(max*1.0*rand()/(RAND_MAX+1.0));
|
||||
|
@ -313,7 +313,7 @@ SWITCH_DECLARE(switch_status_t) switch_stun_lookup (char **ip,
|
|||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
switch_socket_opt_set(sock, APR_SO_NONBLOCK, TRUE);
|
||||
switch_socket_opt_set(sock, SWITCH_SO_NONBLOCK, TRUE);
|
||||
packet = switch_stun_packet_build_header(SWITCH_STUN_BINDING_REQUEST, NULL, buf);
|
||||
switch_stun_random_string(username, 32, NULL);
|
||||
switch_stun_packet_attribute_add_username(packet, username, 32);
|
||||
|
@ -333,7 +333,7 @@ SWITCH_DECLARE(switch_status_t) switch_stun_lookup (char **ip,
|
|||
|
||||
if ((elapsed = (unsigned int)((switch_time_now() - started) / 1000)) > 5000) {
|
||||
*err = "Timeout";
|
||||
switch_socket_shutdown(sock, APR_SHUTDOWN_READWRITE);
|
||||
switch_socket_shutdown(sock, SWITCH_SHUTDOWN_READWRITE);
|
||||
switch_socket_close(sock);
|
||||
return SWITCH_STATUS_TIMEOUT;
|
||||
}
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
*
|
||||
*/
|
||||
#include <switch.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#ifndef WIN32
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
@ -193,97 +190,12 @@ SWITCH_DECLARE(switch_status_t) switch_find_local_ip(char *buf, int len, int fam
|
|||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(int) switch_perform_regex(char *field, char *expression, pcre **new_re, int *ovector, uint32_t olen)
|
||||
{
|
||||
const char *error = NULL;
|
||||
int erroffset = 0;
|
||||
pcre *re = NULL;
|
||||
int match_count = 0;
|
||||
|
||||
if (!(field && expression)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
re = pcre_compile(expression, /* the pattern */
|
||||
0, /* default options */
|
||||
&error, /* for error message */
|
||||
&erroffset, /* for error offset */
|
||||
NULL); /* use default character tables */
|
||||
if (error) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "COMPILE ERROR: %d [%s]\n", erroffset, error);
|
||||
switch_clean_re(re);
|
||||
return 0;
|
||||
}
|
||||
|
||||
match_count = pcre_exec(re, /* result of pcre_compile() */
|
||||
NULL, /* we didn't study the pattern */
|
||||
field, /* the subject string */
|
||||
(int) strlen(field), /* the length of the subject string */
|
||||
0, /* start at offset 0 in the subject */
|
||||
0, /* default options */
|
||||
ovector, /* vector of integers for substring information */
|
||||
olen); /* number of elements (NOT size in bytes) */
|
||||
|
||||
if (match_count <= 0) {
|
||||
switch_clean_re(re);
|
||||
match_count = 0;
|
||||
}
|
||||
|
||||
*new_re = re;
|
||||
|
||||
return match_count;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_perform_substitution(pcre *re, int match_count, char *data, char *field_data, char *substituted, uint32_t len, int *ovector)
|
||||
{
|
||||
char index[10] = "";
|
||||
char replace[1024] = "";
|
||||
uint32_t x, y = 0, z = 0, num = 0;
|
||||
|
||||
for (x = 0; x < (len-1) && x < strlen(data);) {
|
||||
if (data[x] == '$') {
|
||||
x++;
|
||||
|
||||
if (!(data[x] > 47 && data[x] < 58)) {
|
||||
substituted[y++] = data[x-1];
|
||||
continue;
|
||||
}
|
||||
|
||||
while (data[x] > 47 && data[x] < 58) {
|
||||
index[z++] = data[x];
|
||||
x++;
|
||||
}
|
||||
index[z++] = '\0';
|
||||
z = 0;
|
||||
num = atoi(index);
|
||||
|
||||
if (pcre_copy_substring(field_data,
|
||||
ovector,
|
||||
match_count,
|
||||
num,
|
||||
replace,
|
||||
sizeof(replace)) > 0) {
|
||||
unsigned int r;
|
||||
for (r = 0; r < strlen(replace); r++) {
|
||||
substituted[y++] = replace[r];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
substituted[y++] = data[x];
|
||||
x++;
|
||||
}
|
||||
}
|
||||
substituted[y++] = '\0';
|
||||
}
|
||||
|
||||
|
||||
|
||||
SWITCH_DECLARE(switch_time_t) switch_str_time(char *in)
|
||||
{
|
||||
switch_time_exp_t tm = {0};
|
||||
int proceed = 0, ovector[30];
|
||||
pcre *re = NULL;
|
||||
switch_regex_t *re = NULL;
|
||||
char replace[1024] = "";
|
||||
switch_time_t ret = 0;
|
||||
char *pattern = "^(\\d+)-(\\d+)-(\\d+)\\s*(\\d*):{0,1}(\\d*):{0,1}(\\d*)";
|
||||
|
@ -291,39 +203,39 @@ SWITCH_DECLARE(switch_time_t) switch_str_time(char *in)
|
|||
switch_time_exp_lt(&tm, switch_time_now());
|
||||
tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
|
||||
|
||||
if ((proceed = switch_perform_regex(in, pattern, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
if ((proceed = switch_regex_perform(in, pattern, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
|
||||
|
||||
if (proceed > 1) {
|
||||
pcre_copy_substring(in, ovector, proceed, 1, replace, sizeof(replace));
|
||||
switch_regex_copy_substring(in, ovector, proceed, 1, replace, sizeof(replace));
|
||||
tm.tm_year = atoi(replace) - 1900;
|
||||
}
|
||||
|
||||
if (proceed > 2) {
|
||||
pcre_copy_substring(in, ovector, proceed, 2, replace, sizeof(replace));
|
||||
switch_regex_copy_substring(in, ovector, proceed, 2, replace, sizeof(replace));
|
||||
tm.tm_mon = atoi(replace) - 1;
|
||||
}
|
||||
|
||||
if (proceed > 3) {
|
||||
pcre_copy_substring(in, ovector, proceed, 3, replace, sizeof(replace));
|
||||
switch_regex_copy_substring(in, ovector, proceed, 3, replace, sizeof(replace));
|
||||
tm.tm_mday = atoi(replace);
|
||||
}
|
||||
|
||||
if (proceed > 4) {
|
||||
pcre_copy_substring(in, ovector, proceed, 4, replace, sizeof(replace));
|
||||
switch_regex_copy_substring(in, ovector, proceed, 4, replace, sizeof(replace));
|
||||
tm.tm_hour = atoi(replace);
|
||||
}
|
||||
|
||||
if (proceed > 5) {
|
||||
pcre_copy_substring(in, ovector, proceed, 5, replace, sizeof(replace));
|
||||
switch_regex_copy_substring(in, ovector, proceed, 5, replace, sizeof(replace));
|
||||
tm.tm_min = atoi(replace);
|
||||
}
|
||||
|
||||
if (proceed > 6) {
|
||||
pcre_copy_substring(in, ovector, proceed, 6, replace, sizeof(replace));
|
||||
switch_regex_copy_substring(in, ovector, proceed, 6, replace, sizeof(replace));
|
||||
tm.tm_sec = atoi(replace);
|
||||
}
|
||||
|
||||
apr_time_exp_gmt_get(&ret, &tm);
|
||||
switch_time_exp_gmt_get(&ret, &tm);
|
||||
return ret;
|
||||
} /* possible else with more patterns later */
|
||||
|
||||
|
@ -331,20 +243,6 @@ SWITCH_DECLARE(switch_time_t) switch_str_time(char *in)
|
|||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_exists(const char *filename)
|
||||
{
|
||||
int32_t wanted = APR_FINFO_TYPE;
|
||||
apr_finfo_t info = {0};
|
||||
if (filename) {
|
||||
apr_stat(&info, filename, wanted, NULL);
|
||||
if (info.filetype != APR_NOFILE) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(char *) switch_priority_name(switch_priority_t priority)
|
||||
{
|
||||
switch(priority) { /*lol*/
|
||||
|
@ -377,28 +275,6 @@ SWITCH_DECLARE(char *) get_addr(char *buf, switch_size_t len, struct in_addr *in
|
|||
return buf;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(char *) switch_get_addr(char *buf, switch_size_t len, switch_sockaddr_t *in)
|
||||
{
|
||||
return get_addr(buf, len, &in->sa.sin.sin_addr);
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(apr_status_t) switch_socket_recvfrom(apr_sockaddr_t *from, apr_socket_t *sock,
|
||||
apr_int32_t flags, char *buf,
|
||||
apr_size_t *len)
|
||||
{
|
||||
apr_status_t r;
|
||||
|
||||
if ((r = apr_socket_recvfrom(from, sock, flags, buf, len)) == APR_SUCCESS) {
|
||||
from->port = ntohs(from->sa.sin.sin_port);
|
||||
/* from->ipaddr_ptr = &(from->sa.sin.sin_addr);
|
||||
* from->ipaddr_ptr = inet_ntoa(from->sa.sin.sin_addr);
|
||||
*/
|
||||
}
|
||||
|
||||
return r;
|
||||
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(char) switch_rfc2833_to_char(int event)
|
||||
{
|
||||
if (event > -1 && event < (int32_t) sizeof(RFC2833_CHARS)) {
|
||||
|
@ -530,26 +406,6 @@ SWITCH_DECLARE(const char *) switch_cut_path(const char *in)
|
|||
}
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_socket_create_pollfd(switch_pollfd_t *poll, switch_socket_t *sock,
|
||||
switch_int16_t flags, switch_memory_pool_t *pool)
|
||||
{
|
||||
switch_pollset_t *pollset;
|
||||
|
||||
if (switch_pollset_create(&pollset, 1, pool, flags) != SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
poll->desc_type = SWITCH_POLL_SOCKET;
|
||||
poll->reqevents = flags;
|
||||
poll->desc.s = sock;
|
||||
poll->client_data = sock;
|
||||
|
||||
if (switch_pollset_add(pollset, poll) != SWITCH_STATUS_SUCCESS) {
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_string_match(const char *string, size_t string_len, const char *search, size_t search_len)
|
||||
{
|
||||
|
@ -661,17 +517,6 @@ SWITCH_DECLARE(char *) switch_url_decode(char *s)
|
|||
}
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
/* this forces certain symbols to not be optimized out of the dll */
|
||||
void include_me(void)
|
||||
{
|
||||
apr_socket_shutdown(NULL, 0);
|
||||
apr_socket_recvfrom(NULL, NULL, 0, NULL, NULL);
|
||||
apr_mcast_join(NULL, NULL, NULL, NULL);
|
||||
apr_socket_opt_set(NULL, 0, 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
* mode:c
|
||||
|
|
|
@ -54,8 +54,10 @@
|
|||
*/
|
||||
|
||||
#include <switch.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/stat.h>
|
||||
#ifndef WIN32
|
||||
#include <switch_private.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include;..\..\libs\srtp\include;..\..\libs\srtp\crypto\include;..\..\libs\libresample\include;..\..\libs\libteletone\src"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS;PCRE_STATIC"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
|
@ -137,7 +137,7 @@
|
|||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\src\include;..\..\libs\include;..\..\libs\srtp\include;..\..\libs\srtp\crypto\include;..\..\libs\libresample\include;..\..\libs\libteletone\src"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS;CRASH_PROT"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FREESWITCHCORE_EXPORTS;CRASH_PROT;PCRE_STATIC"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderThrough="switch.h"
|
||||
|
@ -207,6 +207,10 @@
|
|||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_apr.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_buffer.c"
|
||||
>
|
||||
|
@ -247,6 +251,10 @@
|
|||
RelativePath="..\..\src\switch_core.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_core_db.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_event.c"
|
||||
>
|
||||
|
@ -263,6 +271,10 @@
|
|||
RelativePath="..\..\src\switch_log.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_regex.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\switch_resample.c"
|
||||
>
|
||||
|
@ -321,6 +333,10 @@
|
|||
RelativePath="..\..\src\include\switch_core.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_core_db.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_event.h"
|
||||
>
|
||||
|
@ -349,6 +365,10 @@
|
|||
RelativePath="..\..\src\include\switch_platform.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_regex.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_resample.h"
|
||||
>
|
||||
|
@ -357,10 +377,6 @@
|
|||
RelativePath="..\..\src\include\switch_rtp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_sqlite.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_stun.h"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue