[Home]

Summary:ASTERISK-04335: [patch] chan_sip.c: remove 4 copies of similar code.
Reporter:Luigi Rizzo (rizzo)Labels:
Date Opened:2005-06-03 10:54:49Date Closed:2008-01-15 15:38:24.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) reply_digest.2.diff
( 1) reply_digest.c
( 2) reply_digest.diff
Description:function reply_digest() contains 5 copies of the same 10 lines of code
to match 5 different keywords. Replace the replicated code with a
loop and a lookup table, a lot more readable.

For ease of review I also supply the modified function as a separate file.
Comments:By: Olle Johansson (oej) 2005-06-03 11:45:29

Rizzo, please report all issues in the correct category. You have to pick SIP as a category *before* you place the bug. I usually only read the SIP category, so I would have missed these patches...

By: Olle Johansson (oej) 2005-06-03 11:46:03

This collides with the SIPura patch. Let's take that patch first, then refix this patch.

By: Olle Johansson (oej) 2005-06-03 11:56:36

Please provide *one* patch file with both changes. THank you.

By: Luigi Rizzo (rizzo) 2005-06-03 13:41:39

1) sorry for misfiling, i realised too late... any way i can change the
  project/category of a report i submitted ?

2) what number is the SIPura patch ?

By: Olle Johansson (oej) 2005-06-04 07:01:34

The Sipura patch is in, so please update this patch to current CVS head.

By: Olle Johansson (oej) 2005-06-17 02:30:17

Rizzo, we are waiting for an updated patch.

Greetings from Astricon!

/O

By: Luigi Rizzo (rizzo) 2005-06-17 03:37:13

uploaded new version of the patch, reply_digest.2.diff, which applies
to today's sources.
It depends on ASTERISK-4337 for function ast_skip_blanks(), so please apply
that one first.
Enjoy the conference :)

By: Kevin P. Fleming (kpfleming) 2005-06-17 09:27:58

Committed to CVS HEAD, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:38:24.000-0600

Repository: asterisk
Revision: 5925

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r5925 | kpfleming | 2008-01-15 15:38:24 -0600 (Tue, 15 Jan 2008) | 2 lines

clean up and optimize reply_digest (bug ASTERISK-4335)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=5925