[asterisk-bugs] [LibSS7 0015566]: Statement after 'return' (link->adj_sp->state will not be set correctly)

Asterisk Bug Tracker noreply at bugs.digium.com
Sun Jan 23 13:46:45 CST 2011


The following issue is now in status NEW (again) 
====================================================================== 
https://issues.asterisk.org/view.php?id=15566 
====================================================================== 
Reported By:                Tian00di00
Assigned To:                
====================================================================== 
Project:                    LibSS7
Issue ID:                   15566
Category:                   General
Reproducibility:            have not tried
Severity:                   major
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
JIRA:                        
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 269 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2009-07-24 03:34 CDT
Last Modified:              2011-01-23 13:46 CST
====================================================================== 
Summary:                    Statement after 'return' (link->adj_sp->state will
not be set correctly)
Description: 
Version SVN
SVN Trunk
SVN Revision 269

Source file: mtp3.c

Lines: 707-708

static int mtp3_init(struct mtp2 *link)
{
    int res;
    struct adjacent_sp *adj_sp = link->adj_sp;

    if (adj_sp->state == MTP3_DOWN) {
        AUTORL(rl, link);
        if (link->inhibit & INHIBITED_LOCALLY) {
            return net_mng_send(link, NET_MNG_LIN, rl, 0);
            link->adj_sp->state = MTP3_ALIGN;  // ***This line will NEVER
be executed?****
        } else if (!(adj_sp->tra & SENT)) {
            res = net_mng_send(link, NET_MNG_TRA, rl, 0);
            mtp3_check(adj_sp);
            return res;
        }
    }
    return 0;
}

Bug description: the line after 'return net_mng_send(link, NET_MNG_LIN,
rl, 0);
' will NEVER be excecuted!
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-23 13:46 tilghman       Asterisk Version         1.6.0.10 => SVN     
2011-01-23 13:46 tilghman       Assigned To              mattf =>            
2011-01-23 13:46 tilghman       Status                   assigned => new     
======================================================================




More information about the asterisk-bugs mailing list