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

Kaloyan Kovachev (JIRA) noreply at issues.asterisk.org
Fri Jul 13 13:14:20 CDT 2012


    [ https://issues.asterisk.org/jira/browse/SS7-40?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=194861#comment-194861 ] 

Kaloyan Kovachev commented on SS7-40:
-------------------------------------

The state should not be changed here and remain DOWN. Because only UP and DOWN are used the rest (ALIGN and RESTART) should be removed.

> 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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list