Appliying the patch

hi,

I see the patch for Asterisk 1.2.x in:

bugs.digium.com/view.php?id=4903

asterisk-20061212-tcp.patch [^] (42,703 bytes) 12-11-06 23:38

Is there any doc or where I can learn on How to apply this patch. [Could not find the instruction on how to apply]

In Asterisk 1.2.xx and 1.4.x, after downloaded and extracted, I also see the file chan_sip.c in channels/chan_sip.c (Of course it’s different than the patch one)

By the way, is there away to uninstall and reinstall? For e.g, I have older version 1.2 installed, now want to uninstall this v1.2.x and install v1.4.x. If the v1.4.x will not work, then I wll uninstall v1.4.x and reinstall v1.2.

Timolthy

Patching usually works by copying the patch file to the directory of the files it is going to patch and running the following command:

patch < name_of_the_patch.patch

Hi,

Thanks for your input.

Is the patch much be applied after downloaded and extracted before install process? (because, after installed I could not find chan_sip.c anywhere)

I saved the patch file into /asterisk-1.2.14/channels then go inside /asterisk-1.2.14/channels and executed the command you suggested:

I got following err:

[root@localhost channels]# patch < asterisk-20061212-tcp.patch
patching file chan_sip.c
Hunk #1 succeeded at 95 with fuzz 1 (offset -62 lines).
Hunk #2 FAILED at 454.
Hunk #3 FAILED at 972.
Hunk #4 FAILED at 1094.
Hunk #5 succeeded at 9732 with fuzz 1 (offset 8555 lines).
Hunk #6 FAILED at 9947.
Hunk #7 FAILED at 10785.
Hunk #8 FAILED at 11475.
Hunk #9 FAILED at 11494.
Hunk #10 FAILED at 11520.
Hunk #11 FAILED at 11704.
Hunk #12 FAILED at 12982.
Hunk #13 FAILED at 14210.
Hunk #14 FAILED at 14267.
Hunk #15 FAILED at 15306.
Hunk #16 FAILED at 15473.
Hunk #17 FAILED at 16454.
Hunk #18 FAILED at 16470.
Hunk #19 FAILED at 16547.
Hunk #20 FAILED at 16631.
Hunk #21 FAILED at 17110.
Hunk #22 FAILED at 17740.
Hunk #23 FAILED at 17759.
Hunk #24 FAILED at 17789.
Hunk #25 FAILED at 19046.
Hunk #26 FAILED at 23646.
Hunk #27 FAILED at 23713.
Hunk #28 FAILED at 23799.
Hunk #29 FAILED at 23851.
Hunk #30 FAILED at 24011.
Hunk #31 succeeded at 3491 with fuzz 2 (offset -12048 lines).
Hunk #32 succeeded at 24323 with fuzz 2 (offset 8597 lines).
Hunk #33 FAILED at 24968.
Hunk #34 FAILED at 25112.
Hunk #35 FAILED at 25220.
Hunk #36 FAILED at 25296.
Hunk #37 FAILED at 25498.
Hunk #38 FAILED at 25638.
Hunk #39 succeeded at 4962 (offset -12271 lines).
Hunk #40 FAILED at 5718.
Hunk #41 succeeded at 26530 with fuzz 2 (offset 8416 lines).
Hunk #42 succeeded at 5957 (offset -12267 lines).
Hunk #43 succeeded at 26660 (offset 8416 lines).
35 out of 43 hunks FAILED – saving rejects to file chan_sip.c.rej

Is that expected and what should I do?

Thanks,

Timolthy