Hacker News new | ask | show | jobs
by jetsnoc 6037 days ago
I'm not surprised.

I've been an Asterisk user, Admin and Coder since 2003 Asterisk's internals has some issues to be truly concerned about. The MOST concerning part is the attitude of the community-- it's not longer a fun loving open source community but more of a "How can I make more money from this?" At least that's my opinion and experience while trying to hammer out some changes to chan_sip this last month.

1 comments

Anyone diving inside the chan_sip is a brave, brave man. My general feeling from working with asterisk code is that if you ever, in any situation see code like this:

    while(pkt->owner->owner && ast_channel_trylock(pkt->owner->owner)) {
      sip_pvt_unlock(pkt->owner);
      usleep(1);
      sip_pvt_lock(pkt->owner);
    }
run! Run away and don't look back!

The code basically translates to - "as long as noone freed our important structure's owner-owner (but someone works on it) unlock our owner for a split-second so we don't deadlock and pray we don't crash" (if you want to know why we don't crash, ask oej, because he's the only person who can actually explain who holds which lock at this point and why the owner won't be freed - which of course leads to other people making modifications that break this rule).