[prev in list] [next in list] [prev in thread] [next in thread]
List: asterisk-dev
Subject: Re: [asterisk-dev] [Code Review]: Add app_v110 to accept v.110 data
From: "Mark Michelson" <reviewboard () asterisk ! org>
Date: 2011-08-30 14:16:19
Message-ID: 20110830141619.30441.84419 () hotblack ! digium ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On Aug. 29, 2011, 9:37 a.m., mjordan wrote:
> > /trunk/apps/app_v110.c, line 646
> > <https://reviewboard.asterisk.org/r/1394/diff/1/?file=19511#file19511line646>
> >
> > Per the coding standard, variable declarations should be at the beginning of the \
> > method (2.3). Provide the type 'int' as well.
Actually, this is allowed by the coding guidelines, since the declaration is at the \
beginning of the for loop's scope.
The guideline you are thinking of states that variables shouldn't be declared \
"mid-block." In other words, no mixed declarations and code. Since this declaration \
is at the top of the scope, it's fine.
> On Aug. 29, 2011, 9:37 a.m., mjordan wrote:
> > /trunk/apps/app_v110.c, line 593
> > <https://reviewboard.asterisk.org/r/1394/diff/1/?file=19511#file19511line593>
> >
> > Per the coding standard, variable declarations should be at the beginning of the \
> > method (2.3)
Actually, this is allowed by the coding guidelines, since the declaration is at the \
beginning of the for loop's scope.
The guideline you are thinking of states that variables shouldn't be declared \
"mid-block." In other words, no mixed declarations and code. Since this declaration \
is at the top of the scope, it's fine.
- Mark
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1394/#review4155
-----------------------------------------------------------
On Aug. 26, 2011, 7:19 p.m., dwmw2 wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1394/
> -----------------------------------------------------------
>
> (Updated Aug. 26, 2011, 7:19 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Summary
> -------
>
> This adds a new application app_v110 which accepts data calls from a GSM mobile \
> phone.
>
> This addresses bug ASTERISK-14185.
> https://issues.asterisk.org/jira/browse/ASTERISK-14185
>
>
> Diffs
> -----
>
> /trunk/channels/chan_dahdi.c 333428
> /trunk/apps/app_v110.c PRE-CREATION
>
> Diff: https://reviewboard.asterisk.org/r/1394/diff
>
>
> Testing
> -------
>
> Asterisk 1.8.5.0+app_v110, ISDN BRI on British Telecom, Nokia N97 GSM phone...
>
> AT+CBST=71,0,1
> OK
> ATD01799xxxxxx
> CONNECT
> Fedora release 15 (Lovelock)
> Kernel 2.6.40.3-0.fc15.i686 on an i686 (/dev/pts/34)
>
> obelisk.infradead.org login: dwmw2
> Password:
> Last login: Sat Aug 27 01:02:52 2011 from 07976xxxxxx
> [dwmw2@obelisk ~]$
>
>
> Thanks,
>
> dwmw2
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/1394/">https://reviewboard.asterisk.org/r/1394/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On August 29th, 2011, 9:37 a.m., <b>mjordan</b> \
wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://reviewboard.asterisk.org/r/1394/diff/1/?file=19511#file19511line593" \
style="color: black; font-weight: bold; text-decoration: \
underline;">/trunk/apps/app_v110.c</a> <span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td> <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">static void v110_process_frame(struct v110_state *vs)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">593</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="kt">unsigned</span> <span class="kt">char</span> <span \
class="n">tmp</span><span class="p">;</span></pre></td> </tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Per the coding standard, \
variable declarations should be at the beginning of the method (2.3)</pre> \
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Actually, \
this is allowed by the coding guidelines, since the declaration is at the beginning \
of the for loop's scope.
The guideline you are thinking of states that variables shouldn't be declared \
"mid-block." In other words, no mixed declarations and code. Since this \
declaration is at the top of the scope, it's fine. </pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On August 29th, 2011, 9:37 a.m., <b>mjordan</b> \
wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://reviewboard.asterisk.org/r/1394/diff/1/?file=19511#file19511line646" \
style="color: black; font-weight: bold; text-decoration: \
underline;">/trunk/apps/app_v110.c</a> <span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td> <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: \
0; ">static void v110_process_frame(struct v110_state *vs)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">646</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="kt">unsigned</span> <span class="n">newend</span> <span class="o">=</span> \
<span class="p">(</span><span class="n">vs</span><span class="o">-></span><span \
class="n">ibufend</span> <span class="o">+</span> <span class="mi">1</span><span \
class="p">)</span> <span class="o">&</span> <span class="p">(</span><span \
class="n">IBUF_LEN</span><span class="o">-</span><span class="mi">1</span><span \
class="p">);</span></pre></td> </tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Per the coding standard, \
variable declarations should be at the beginning of the method (2.3). Provide the \
type 'int' as well.</pre> </blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Actually, \
this is allowed by the coding guidelines, since the declaration is at the beginning \
of the for loop's scope.
The guideline you are thinking of states that variables shouldn't be declared \
"mid-block." In other words, no mixed declarations and code. Since this \
declaration is at the top of the scope, it's fine.
</pre>
<br />
<p>- Mark</p>
<br />
<p>On August 26th, 2011, 7:19 p.m., dwmw2 wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By dwmw2.</div>
<p style="color: grey;"><i>Updated Aug. 26, 2011, 7:19 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This adds a new application app_v110 which accepts data calls from a GSM \
mobile phone.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Asterisk 1.8.5.0+app_v110, ISDN BRI on British Telecom, Nokia N97 GSM \
phone...
AT+CBST=71,0,1
OK
ATD01799xxxxxx
CONNECT
Fedora release 15 (Lovelock)
Kernel 2.6.40.3-0.fc15.i686 on an i686 (/dev/pts/34)
obelisk.infradead.org login: dwmw2
Password:
Last login: Sat Aug 27 01:02:52 2011 from 07976xxxxxx
[dwmw2@obelisk ~]$
</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-14185">ASTERISK-14185</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/channels/chan_dahdi.c <span style="color: grey">(333428)</span></li>
<li>/trunk/apps/app_v110.c <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/1394/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic