Summary:ASTERISK-06367: [patch] channel.c ast_channel_make_compatible remove duplicate code
Reporter:Denis Smirnov (mithraen)Labels:
Date Opened:2006-02-19 08:53:24.000-0600Date Closed:2007-01-07 08:33:10.000-0600
Versions:Frequency of
Environment:Attachments:( 0) bug6542-20060520-1300.diff
Description:Simple refactoring with removing duplicate code and added doxygen comment for created helper function
Comments:By: Tilghman Lesher (tilghman) 2006-02-19 12:14:42.000-0600

This patch can't possibly work.  Have you bothered testing it?

By: Denis Smirnov (mithraen) 2006-02-19 13:59:28.000-0600

May be i create diff with alpha version... I retest it and post tested patch

By: Denis Smirnov (mithraen) 2006-02-19 14:26:24.000-0600

This patch works for me

By: Tilghman Lesher (tilghman) 2006-02-19 14:38:23.000-0600

If you had actually tested it, you would have seen that it creates an infinite loop.

By: Denis Smirnov (mithraen) 2006-02-19 15:12:49.000-0600

_This_ patch works for me.
I don;t upload it :(

By: Denis Smirnov (mithraen) 2006-02-22 05:59:24.000-0600

asterisk.mithraen.channel.simplify.patch3 tested in production.

Please, delete asterisk.mithraen.channel.simplify.patch & asterisk.mithraen.channel.simplify2.patch

By: Denis Smirnov (mithraen) 2006-03-01 02:13:28.000-0600

This patch tested for week in production.

By: Denis Smirnov (mithraen) 2006-03-14 12:40:10.000-0600

Can this be reviewd?
I use it in production, and this works fine.

By: Serge Vecher (serge-v) 2006-05-03 16:04:52

what's the status with disclaimer?

By: Denis Smirnov (mithraen) 2006-05-04 05:06:32


By: Denis Smirnov (mithraen) 2006-05-20 09:45:34

This patch tested in production for two month.
I think it can be reviewed, and may be integrated now :)

By: Tilghman Lesher (tilghman) 2006-05-20 10:08:27

I'm not seeing how this reduces code or has any benefit.  Could you explain it better?

By: Denis Smirnov (mithraen) 2006-05-20 13:46:09

There is some duplicated lines of code, that removed by this patch.
Code would not be smaller after this, but it helps to future modification of this function, like done in ASTERISK-4703.

By: Jason Parker (jparker) 2006-05-20 15:27:20

New patch uploaded.  Updated to latest trunk, and made some minor changes.  Specifically, keeping the same returns, so if either channel "fails" the translation, the function will return immediately instead of trying the second direction - which is what happened before the other patch.

By: Denis Smirnov (mithraen) 2006-05-21 09:25:09

Thanks north, but why you delete comments?

and last return res, I think, need to be changed to return 0.

By: Jason Parker (jparker) 2006-05-21 19:33:51

In my patch, it will return 0, if either if the calls to _helper() fail.

Perhaps there should be a second if (rc < 0) return rc;  ?

By: Denis Smirnov (mithraen) 2006-05-22 06:27:20

last return can't return other than zero, I think it can be changed to return 0 :) But it doesn't change anything.

By: Serge Vecher (serge-v) 2006-06-06 13:49:27

cleanly applied to r32606 and didnĀ“t break anything on lite testing with some Cisco SIP phones I have.

By: Denis Smirnov (mithraen) 2006-08-16 14:05:28

By: jmls (jmls) 2006-11-01 05:31:02.000-0600

Corydon76, how do you want to proceed with this ?

By: jmls (jmls) 2007-01-07 03:14:23.000-0600

Corydon76, can we proceed with this or do you want to close ?

By: Tilghman Lesher (tilghman) 2007-01-07 08:33:09.000-0600

Committed, rev 49784.