You could run one of the numerous free Virtual Machine packages, Vmware Player, Sun Virtual Box, and run a Linux machine contained within your windows machine :)<br><br>Donny<br><br><div class="gmail_quote">On Thu, Jul 23, 2009 at 11:07 PM, tian <span dir="ltr"><<a href="mailto:tian00di00@live.com">tian00di00@live.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I am NOT a programmer, I am even running Windows instead of Linux. I have<br>
some knowledge of C and I am reading through libss7 source code to learn<br>
about the internals of SS7 signaling. I don't know how to submit a patch but<br>
I have found a couple of errors in the libss7 source code, how can a person<br>
like me (some sort of a code reviewer but not a technician) to send<br>
feedbacks? Is there any guideline? Thanks!<br>
<br>
p.s. I believe the following libss7 code contain bugs:<br>
<br>
Version SVN<br>
SVN Trunk<br>
SVN Revision 269<br>
<br>
Source file: mtp3.c<br>
<br>
Lines: 470-476<br>
<br>
if (LINKSET_UP_DELAY > -1) { // #define LINKSET_UP_DELAY 500<br>
if (ss7->linkset_up_timer > -1)<br>
ss7_schedule_del(ss7, &ss7->linkset_up_timer);<br>
ss7->linkset_up_timer = ss7_schedule_event(ss7, LINKSET_UP_DELAY,<br>
&linkset_up_expired, ss7);<br>
ss7_message(ss7, "LINKSET UP DELAYING RESETTING\n");<br>
} else // **** this clause will NEVER be excecuted!<br>
ss7_linkset_up_event(ss7);<br>
<br>
<br>
Description of the bug: since LINKSET_UP_DELAY is #define'd to be 500, the<br>
if condition is always true so the else clause will never be executed!<br>
<br>
<br>
Version SVN<br>
SVN Trunk<br>
SVN Revision 269<br>
<br>
Source file: mtp3.c<br>
<br>
Lines: 452-464<br>
<br>
/* try force uninhibit */<br>
if (i == ss7->numlinks) {<br>
for (i = 0; i < ss7->numlinks; i++) {<br>
if (ss7->links[i]->inhibit & INHIBITED_REMOTELY) {<br>
if (!(ss7->links[i]->got_sent_netmsg & SENT_LFU))<br>
break; // **** This break should be deleted! ****<br>
AUTORL(rl, ss7->links[i]);<br>
net_mng_send(ss7->links[i], NET_MNG_LFU, rl, 0);<br>
ss7_message(ss7, "Forced uninhibiting remotely inhibited link<br>
(no more signalling links are in service) SLC: %i ADJPC: %i\n",<br>
ss7->links[i]->slc, ss7->links[i]->dpc);<br>
break;<br>
}<br>
}<br>
}<br>
<br>
Bug description: the first 'break' keyword is misused and should be deleted!<br>
Apparently the logic of the program is to check whether a LFU has been sent<br>
to the far end, and if it is not the case, send a LFU, but the 'break'<br>
breaks the logic.<br>
<br>
<br>
I have some other bugs, if positive replies are received, I am glad to<br>
report them (In the hope that installing a Linux box is not required in the<br>
process of bug reporting).<br>
<br>
Regard,<br>
<br>
Tian<br>
<br>
<br>
--------------------------------------------------<br>
From: "Russell Bryant" <<a href="mailto:russell@digium.com">russell@digium.com</a>><br>
Sent: Friday, July 24, 2009 8:32 AM<br>
To: "Asterisk Developers Mailing List" <<a href="mailto:asterisk-dev@lists.digium.com">asterisk-dev@lists.digium.com</a>><br>
Subject: Re: [asterisk-dev] strange libss7 coding style!<br>
<div><div></div><div class="h5"><br>
> tian wrote:<br>
>> Hi, guys!<br>
><br>
> Hi!<br>
><br>
> Please create a new message instead of reply to another one when<br>
> starting a new thread.<br>
><br>
>> suppose that A, B, C and D are some boolean expressions, the libss7 code<br>
>> used something like this:<br>
>><br>
>> if ( (A && B) ? 1 : (C || D) )<br>
>> // statements when condition is true<br>
>><br>
>><br>
>> I think the following would be equivalent and more clean<br>
>><br>
>> if ( (A && B) || (C || D) )<br>
>> // statements when condition is true<br>
>><br>
>><br>
>> I think this is strange coding style and am wondering what benefit can we<br>
>> get from this? Do you?<br>
><br>
> Agreed. Patches that simplify logic like this are welcome.<br>
><br>
> --<br>
> Russell Bryant<br>
> Digium, Inc. | Engineering Manager, Open Source Software<br>
> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA<br>
> Check us out at: <a href="http://www.digium.com" target="_blank">www.digium.com</a> & <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a><br>
><br>
> _______________________________________________<br>
> --Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
><br>
> asterisk-dev mailing list<br>
> To UNSUBSCRIBE or update options visit:<br>
> <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
><br>
<br>
_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--" target="_blank">http://www.api-digital.com--</a><br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br>
</div></div></blockquote></div><br>