[asterisk-bugs] [JIRA] Commented: (SS7-39) Wrong program logic (LFU will NOT be sent)
Kaloyan Kovachev (JIRA)
noreply at issues.asterisk.org
Fri Jul 13 10:55:20 CDT 2012
[ https://issues.asterisk.org/jira/browse/SS7-39?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=194855#comment-194855 ]
Kaloyan Kovachev commented on SS7-39:
-------------------------------------
LFU should not be resend, but the logic for the check is inverted and as result it will never be sent.
The correct check is as in the comment:
if (ss7->links[i]->got_sent_netmsg & SENT_LFU)
break;
> Wrong program logic (LFU will NOT be sent)
> ------------------------------------------
>
> Key: SS7-39
> URL: https://issues.asterisk.org/jira/browse/SS7-39
> Project: LibSS7
> Issue Type: Bug
> Components: General
> Reporter: tian
>
> Version SVN
> SVN Trunk
> SVN Revision 269
> Source file: mtp3.c
> Lines: 452-464
> /* try force uninhibit */
> if (i == ss7->numlinks) {
> for (i = 0; i < ss7->numlinks; i++) {
> if (ss7->links[i]->inhibit & INHIBITED_REMOTELY) {
> if (!(ss7->links[i]->got_sent_netmsg & SENT_LFU))
> break; // **** This break should be deleted! ****
> AUTORL(rl, ss7->links[i]);
> net_mng_send(ss7->links[i], NET_MNG_LFU, rl, 0);
> ss7_message(ss7, "Forced uninhibiting remotely inhibited link
> (no more signalling links are in service) SLC: %i ADJPC: %i\n",
> ss7->links[i]->slc, ss7->links[i]->dpc);
> break;
> }
> }
> }
> Bug description: the first 'break' keyword is misused and should be deleted!
> Apparently the logic of the program is to check whether a LFU has been sent
> to the far end, and if it is not the case, send a LFU, but the 'break'
> breaks the logic.
> ****** ADDITIONAL INFORMATION ******
> I am only reading the 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