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

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Jul 24 03:34:18 CDT 2009


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15566 
====================================================================== 
Reported By:                Tian00di00
Assigned To:                mattf
====================================================================== 
Project:                    LibSS7
Issue ID:                   15566
Category:                   General
Reproducibility:            have not tried
Severity:                   major
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.6.0.10 
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:              2009-07-24 03:34 CDT
====================================================================== 
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               
====================================================================== 
2009-07-24 03:34 Tian00di00     New Issue                                    
2009-07-24 03:34 Tian00di00     Status                   new => assigned     
2009-07-24 03:34 Tian00di00     Assigned To               => mattf           
2009-07-24 03:34 Tian00di00     Asterisk Version          => 1.6.0.10        
2009-07-24 03:34 Tian00di00     SVN Branch (only for SVN checkouts, not tarball
releases) =>  trunk          
2009-07-24 03:34 Tian00di00     SVN Revision (number only!) => 269             
======================================================================




More information about the asterisk-bugs mailing list