[asterisk-bugs] [JIRA] (SS7-40) Statement after 'return' (link->adj_sp->state will not be set correctly)

Rusty Newton (JIRA) noreply at issues.asterisk.org
Tue Jun 17 19:02:58 CDT 2014


     [ https://issues.asterisk.org/jira/browse/SS7-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rusty Newton closed SS7-40.
---------------------------

    Resolution: Fixed

Fixed in [LibSS7 2.0.0|http://downloads.asterisk.org/pub/telephony/libss7/ChangeLog-2.0.0]

> Statement after 'return' (link->adj_sp->state will not be set correctly)
> ------------------------------------------------------------------------
>
>                 Key: SS7-40
>                 URL: https://issues.asterisk.org/jira/browse/SS7-40
>             Project: LibSS7
>          Issue Type: Bug
>          Components: General
>            Reporter: tian
>
> 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!
> ****** ADDITIONAL INFORMATION ******
> I am only reading libss7 source code without a running Asterisk box.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list