[asterisk-bugs] [LibSS7 0015563]: program path that'll never be executed!

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Oct 6 12:45:50 CDT 2009


The following issue has been RESOLVED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15563 
====================================================================== 
Reported By:                Tian00di00
Assigned To:                mattf
====================================================================== 
Project:                    LibSS7
Issue ID:                   15563
Category:                   General
Reproducibility:            have not tried
Severity:                   major
Priority:                   normal
Status:                     resolved
Asterisk Version:           1.6.0.10 
JIRA:                        
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 269 
Disclaimer on File?:        N/A 
Request Review:              
Resolution:                 no change required
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-07-23 22:52 CDT
Last Modified:              2009-10-06 12:45 CDT
====================================================================== 
Summary:                    program path that'll never be executed!
Description: 
Version SVN
SVN Trunk
SVN Revision 269

Source file: mtp3.c

Lines: 470-476

if (LINKSET_UP_DELAY > -1) { // #define LINKSET_UP_DELAY 500
    if (ss7->linkset_up_timer > -1)
        ss7_schedule_del(ss7, &ss7->linkset_up_timer);
    ss7->linkset_up_timer = ss7_schedule_event(ss7, LINKSET_UP_DELAY, 
&linkset_up_expired, ss7);
    ss7_message(ss7, "LINKSET UP DELAYING RESETTING\n");
} else // **** this clause will NEVER be excecuted!
    ss7_linkset_up_event(ss7);


Description of the bug: since LINKSET_UP_DELAY is #define'd to be 500, the

if condition is always true so the else clause will never be executed!
====================================================================== 

---------------------------------------------------------------------- 
 (0111918) qwell (administrator) - 2009-10-06 12:45
 https://issues.asterisk.org/view.php?id=15563#c111918 
---------------------------------------------------------------------- 
As written, you're right, this code will never be hit.

However, the intent was to make it configurable.  If this happens at some
point, this code will have to change anyways.

I would rather just leave it as is so that it's clear. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-10-06 12:45 qwell          Note Added: 0111918                          
2009-10-06 12:45 qwell          Status                   assigned => resolved
2009-10-06 12:45 qwell          Resolution               open => no change
required
======================================================================




More information about the asterisk-bugs mailing list