Summary:ASTERISK-06724: [patch] app.c cleanup
Reporter:Andrey S Pankov (casper)Labels:
Date Opened:2006-04-06 19:25:22Date Closed:2006-04-16 01:21:29
Versions:Frequency of
Environment:Attachments:( 0) app.c.diff
Description:The patch unifies read format restore code to make it more readable.
Comments:By: Andrey S Pankov (casper) 2006-04-12 09:41:46

Any feedback here?

By: Tilghman Lesher (tilghman) 2006-04-14 00:09:30

This code introduces a slight change in logic.  I don't know that I'm comfortable with such a change.

By: Luigi Rizzo (rizzo) 2006-04-14 19:53:29

partly committed, thanks (except the first chunk that does not make sense to me)

By: Luigi Rizzo (rizzo) 2006-04-14 19:55:28

committed thanks

By: Andrey S Pankov (casper) 2006-04-15 09:01:05

As to the first chunk - that change was proposed by markster and implemented in app_waitforsilence. Here are the refs:

- http://bugs.digium.com/view.php?id=3759 (for my original patch _without_ rfmt
- http://svn.digium.com/view/asterisk/trunk/apps/app_waitforsilence.c?r1=4868&r2=5173&diff_format=u
 (this is what was commited)

I see that the cases of waitforsilence and ast_getvoice a different from ast_play_and_* where there are such checks. But in the latter case rfmt
may be zero and it's unlikely that chan->readformat may be null in the former.

By: Tilghman Lesher (tilghman) 2006-04-16 01:21:29

Already committed.