FS-10167: Adjusted modules to utilize an isolated pool with auto cleanup per module, which also contains the implementation specific module data. Also changed the thread model of the listener for the wss module to utilize the thread pool, alleviating ownership issues during cleanup.
FS-10167: Switched connection lifecycle to an isolated pool similar to sessions, also refactored the inner WSS transport implementation to be part of the same pool so it is cleaned up with the connection. Switched the connection state machine thread to also utilize thread pool to avoid direct ownership over the thread, similar to session but without the use of a signaled condition due to abstraction of transports which may need to deal with polling for socket events such as with WSS transport. Completely removed the temporary worker thread in the main handle that was for connection/session cleanup.
FS-10167: Added ks_list_delete_iterator() to delete the node at the current iterator position (only if available if iterator is active). Updated blade_session to reflect ks_list_t being internally thread-safe now.
FS-10225: [mod_conference] Incorrect layout chosen when playing a file in a conference with a layout group Don't change layout when playing full-screen anyway
FS-10167: Rewrote the ks_pool allocator, no longer uses paging or internal block allocation, but still retains reference counting and auto cleanup callbacks, should be much more efficient now on windows than the original mmap approach, and all tests now run successfully!
FS-10167: Committing for a clean revert point prior to work on ks_pool internal allocator issues that were identified as the cause of the complicated bug related to freeing pages introduced by switching to malloc/free.
FS-10167: Fixed some issues that appeared primarily under windows testing, committing to determine if a specific read access violation occurs under linux as well.
FS-10167: Fixed an issue with connection cleanup, the same approach should be taken with sessions to avoid any potential thread deadlock due to cleanup from the same thread which is running the session.
FS-10167: Fixed bug with ks_pool_resize allocating incorrectly based on recent allocation code changes. Added some missing files as well from prior commits related to libblade test projects and windows VS project property files.
Shane Bryldt [Fri, 31 Mar 2017 19:06:43 +0000 (13:06 -0600)]
FS-10167: Added windows compilation of libconfig and libsodium to support libblade, all of which now have windows projects and a new libblade solution containing everything. Blade compiles, but many warnings have been disabled and should be reviewed and fixed where reasonable towards clean compiling. Code Analysis has also been enabled for visual studio projects, warnings beginning with C6XXX can be ignored unless adding code-analysis macros to libks and libblade.
Shane Bryldt [Thu, 30 Mar 2017 16:44:25 +0000 (10:44 -0600)]
FS-10167: Updated libks windows project and test projects to utilize the latest build toolset, and added code analysis to identify potential issues before they occur.
Shane Bryldt [Wed, 29 Mar 2017 01:18:20 +0000 (19:18 -0600)]
FS-10167: Added test_thread_pools to windows build, added BREAK condition to wait for objects to be added to the queue before the workers prematurely exit. Fixed a bug in thread pool creation that wasn't showing up under linux test.
Shane Bryldt [Tue, 28 Mar 2017 21:02:09 +0000 (15:02 -0600)]
FS-10167: Added testwebsock to windows build, completely removed precompiled openssl dependancy and injected the use of core library openssl build, everything seems to build and work for windows thus far.
Shane Bryldt [Mon, 27 Mar 2017 22:52:07 +0000 (16:52 -0600)]
FS-10167: Fixed issue with eating processor when ks_sleep() is called on windows, testthreadmutex is now fully functional on windows as well, all tests are passing
Mike Jerris [Mon, 27 Mar 2017 15:59:48 +0000 (15:59 +0000)]
Merge pull request #1218 in FS/freeswitch from ~DRAGOS_OANCEA_NX/freeswitch-dragos-nx:feature/FS-10115-ogg_extension_assoc to master
* commit 'f1b756c63179ab0c5f8f8cb886f9baecedd9f83e':
FS-10115: [mod_sndfile] add ".ogg" extension to mod_sndfile (map audio OGG format to ".ogg" extension too, not only to ".oga") (and change mem pool)
Shane Bryldt [Thu, 23 Mar 2017 22:52:49 +0000 (16:52 -0600)]
FS-10167: Fixed a bug in ks_pool alloc_mem that assumes memory is zeroed before incrementing reference count rather than assigning it, which worked on linux test for some reason but failed under windows test which identified the issue.
Shane Bryldt [Thu, 23 Mar 2017 22:31:16 +0000 (16:31 -0600)]
FS-10167: Switched reader writer lock code to use ks_thread_self_id instead of ks_thread_self, which is more appropriate and resolves a couple issues related to duplicating handles for windows. Clean compiling across all tests on windows now, updated all of the solution and project files for required changes.