[asterisk-dev] [Code Review] Clean up func_odbc's dummy channel usage.

Matthew Nicholson mnicholson at digium.com
Wed Jul 8 13:30:59 CDT 2009



> On 2009-06-30 14:39:09, Tilghman Lesher wrote:
> > /trunk/funcs/func_odbc.c, line 244
> > <http://reviewboard.digium.com/r/290/diff/2/?file=5813#file5813line244>
> >
> >     You need to unlock &queries here before you return.

done. There was also another place this needed to be done.


> On 2009-06-30 14:39:09, Tilghman Lesher wrote:
> > /trunk/funcs/func_odbc.c, line 365
> > <http://reviewboard.digium.com/r/290/diff/2/?file=5813#file5813line365>
> >
> >     For consistency, I'd prefer that this conditional be:  if (!bogus_chan)

done


> On 2009-06-30 14:39:09, Tilghman Lesher wrote:
> > /trunk/funcs/func_odbc.c, line 380
> > <http://reviewboard.digium.com/r/290/diff/2/?file=5813#file5813line380>
> >
> >     Ditto here.

done


> On 2009-06-30 14:39:09, Tilghman Lesher wrote:
> > /trunk/funcs/func_odbc.c, line 435
> > <http://reviewboard.digium.com/r/290/diff/2/?file=5813#file5813line435>
> >
> >     Unlock queries here.

done


> On 2009-06-30 14:39:09, Tilghman Lesher wrote:
> > /trunk/funcs/func_odbc.c, line 464
> > <http://reviewboard.digium.com/r/290/diff/2/?file=5813#file5813line464>
> >
> >     If bogus_chan, then there's no point in doing mode=multirow, because the channel is where we store results.  You could check this condition and jump out here.

done


> On 2009-06-30 14:39:09, Tilghman Lesher wrote:
> > /trunk/funcs/func_odbc.c, line 494
> > <http://reviewboard.digium.com/r/290/diff/2/?file=5813#file5813line494>
> >
> >     and therefore, chan would always exist here, so this conditional can go away.

Not sure how this one can go away.


> On 2009-06-30 14:39:09, Tilghman Lesher wrote:
> > /trunk/funcs/func_odbc.c, line 512
> > <http://reviewboard.digium.com/r/290/diff/2/?file=5813#file5813line512>
> >
> >     if (!bogus_chan)

done


> On 2009-06-30 14:39:09, Tilghman Lesher wrote:
> > /trunk/funcs/func_odbc.c, line 539
> > <http://reviewboard.digium.com/r/290/diff/2/?file=5813#file5813line539>
> >
> >     Ditto

done


> On 2009-06-30 14:39:09, Tilghman Lesher wrote:
> > /trunk/funcs/func_odbc.c, line 584
> > <http://reviewboard.digium.com/r/290/diff/2/?file=5813#file5813line584>
> >
> >     if (!bogus_chan)
> >     
> >     The other thing that occurs to me here is that this is within a conditional of "if (resultset), and resultset is only non-NULL if mode=multirow, which, as we've already established, is non-sensical if bogus_chan

done


> On 2009-06-30 14:39:09, Tilghman Lesher wrote:
> > /trunk/funcs/func_odbc.c, line 665
> > <http://reviewboard.digium.com/r/290/diff/2/?file=5813#file5813line665>
> >
> >     Ditto

done


> On 2009-06-30 14:39:09, Tilghman Lesher wrote:
> > /trunk/funcs/func_odbc.c, line 698
> > <http://reviewboard.digium.com/r/290/diff/2/?file=5813#file5813line698>
> >
> >     Ditto

done


- Matthew


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/290/#review917
-----------------------------------------------------------


On 2009-07-08 13:24:44, Matthew Nicholson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/290/
> -----------------------------------------------------------
> 
> (Updated 2009-07-08 13:24:44)
> 
> 
> Review request for Asterisk Developers and Tilghman Lesher.
> 
> 
> Summary
> -------
> 
> This patch cleans up func_odbc's use of dummy channels a bit.  This is accomplished by releasing the dummy channel after we no longer need it and skipping sections of code that are pointless to execute without a channel.
> 
> 
> Diffs
> -----
> 
>   /trunk/funcs/func_odbc.c 205081 
> 
> Diff: http://reviewboard.digium.com/r/290/diff
> 
> 
> Testing
> -------
> 
> None.
> 
> 
> Thanks,
> 
> Matthew
> 
>




More information about the asterisk-dev mailing list