On 2014-10-31 2:43 AM, Ted Bullock wrote:
On 2014-10-23 3:45 PM, Ted Bullock wrote:
https://github.com/tbullock/freeswitch-openbsd
An update on Freeswitch for OpenBSD.
I placed my first successful phone call today! I called my Mom. Hi Mom!
Things are starting to iron out when it comes to running freeswitch on
openbsd. Most modules appear to be working, however I'd really like to
spend more time actually running them and taking a close look at how
they are being implemented. Right now, things are turning on and saying
that they are working, but its a large code base.
I ended up pulling the hash table implementation from the upstream 1.4
release, instead of using the apr hash functionality. The hash table
implementation is still irking me, and nothing checks for errors or
return values. In fact most of the return values from the hash table api
are completely meaningless; they are just casually 'return success;'
regardless of what's actually happening. I suspect lots of other stuff
in freeswitch is like this... Anyway, hash tables are on the list of
things to re-roll with actual diligence.
Upstream has decided that time_t needs to be 32 bit on all platforms and
deliberately is casting time_t variables to long all over the place.
It's not an emergency, in that things are running, but obviously this
needs to be corrected. I asked on the upstream irc channel about this
and was told that it doesn't matter that there are 2038 issues.
My makefiles need work, I didn't have a lot of experience writing
makefiles before I started with this project. I really wanted to stay
away from the autotools stuff, and I am completely appalled by the
upstream build system. However, my lack of experience writing makefiles
is definitely showing. Anyway, this is on the list of things to do.
Replaced calls to rand with the arc4random stuff (thx guys for the
awesome api). Still need to get to the strcpy stuff.
I haven't written the init script stuff yet as I've just been testing
things as root while I try to get wrinkles ironed. Doing this and
creating an actual package that people can test is probably the next
thing that I will do (tomorrow I hope).
Things died pretty quick when I enabled the strict malloc.conf stuff
too, so there is obviously bad things going on inside this thing.
Looking at this also is on the todo list.
Regarding errata from my last email:
- I am mostly following the upstream version 1.2 stable branch; 1.4 does
some things I consider stupid and don't care about (websockets?)
I pulled everything from 1.2-stable as of last weekend and made sure
that my changes still worked. Upstream 1.2 isn't moving very much any
more except for a very small set of retroactive patches. 1.4 is out of
scope and I don't like a lot of the changes in that version, so 1.2 is
where I'm drawing my line, it does everything I need it to do.
Supposedly the upstream project has been doing work to make things work
on openbsd with their build system, so check that out if you want. I had
a good laugh when I read their openbsd makefile.
- The upstream hashing function uses internal sqlite API calls which I
think is dumb; I tried to use the APR hashing api (which at least is
public api) but I've done something bad and its segfaulting when exiting
the daemon, so I should probably fix that.
This is fixed. Like I said earlier I will probably still re-roll this
from scratch.
- For the modules, I'm currently building static module binaries as well
as the shared equivalents
Um still need to get to this.