Summary:ASTERISK-05822: unclear/useless code near the end of chan_sip.c::handle_request_invite()
Reporter:Luigi Rizzo (rizzo)Labels:
Date Opened:2005-12-12 10:26:27.000-0600Date Closed:2006-01-26 12:41:11.000-0600
Versions:Frequency of
Description:the last block in chan_sip.c::handle_request_invite() has the following code:

if (p && !ast_test_flag(p, SIP_NEEDDESTROY) && !ignore) {
   if (!p->jointcapability) {            
       if (ignore) ...

(and again a few lines later). Given that we enter the block only
if !ignore, i believe that the inner if (ignore) are useless, and we
can go straight to the other case. If someone can confirm this,
I will provide a patch to simplify this block - thanks
Comments:By: Olle Johansson (oej) 2006-01-03 05:37:00.000-0600

I think the !ignore is a bug. I need to check into this a bit more...

By: Olle Johansson (oej) 2006-01-26 12:38:55.000-0600

Went ahead and cleaned up a bit while reading that part of the source. If you have additional suggestions, feel free to submit a patch. Thanks!

By: Olle Johansson (oej) 2006-01-26 12:41:10.000-0600

Added fix to svn trunk, rev 8728.