On 6/21/06, Matt <[EMAIL PROTECTED]> wrote:
Ok,
So here's some information I've, to this point, left out.   I applied
the patch to allow * to be pressed in queues to park a call (*270).
After reverting the patch the system seems stable.  So, it almost
seems like the crash is directly related to the number of times
someone parks a call that came in a queue.

I don't understand, though....

                               /* terminates call */
                             ast_frfree(f);
                             f = NULL;

How does removing those 2 lines cause asterisk to crash?   Basically
the code looks for a *, if it sees it it runs that... so the patch
removes those lines.. so when asterisk sees a * it doesn't do
anything.    The variables are so cryptic I can't exactly figure out
what its doing.. is ast_frfree(f) suppose to 'free' something, perhaps
that is not getting freed?  But then what is f = NULL.  Yikes, who
comes up with these variable names?


Yes, ast_frfree(..) is supposed to free any allocated memory
associated with the pointer to the Asterisk frame structure given to
it. If the structure has already been freed somewhere else in the code
and you try to call this again, you will segfault Asterisk. If you
don't call it at all, you will leak memory associated with the
structure. The pointer is being set to NULL after the call so that
further checks of the pointer itself will be able to determine that
the structure has been free'd already and doesn't need to be done
again (preventing a segfault from calling it twice).

--
Bird's The Word Technologies, Inc.
http://www.btwtech.com/
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to