Closed tbullock closed 11 years ago
Ok, after further thinking
I am ruling out option 1 since I can't believe that using an internal api is the right way to go. I guess that upstream did this because they pulled sqlite into their tree and figured they were free to use it as they saw fit.
Then option 2, I'm ruling this out too. I'm glad that it is built into libc and is readily usable, however I want to ensure that source changes I make can conceivably be merged back upstream, which is absolutely not going to happen with a unique hash table implementation like ohash.
This leaves 3 and 4.
From an engineering perspective, option 3 is probably the way to go since the code paths have been tested, and it should be relatively straight forward to implement.
Option 4... I am extremely tempted to go down this route, however I think that bowing to the practical engineer in my head, I think the best option is to leave this for another day. I can't see any practical point of implementing a custom hashing function that would outweigh the benefit of using the already implemented version in apr back into the code.
So option 3 it is, re-integrating apr hash table into freeswitch.
rewrote switch_core_hash.c to use the apr hash table functionality.
Should be, effectively, a silent swap-out.
This gets us a heck of a lot further into the startup process.
Description
Using system sqlite is crashing FreeSWITCH when trying to insert elements into a hash table.
Possible solutions