[OpenSER-Devel] pvap fixup to mod_fix.c?
Dan Pascu
dan at ag-projects.com
Mon Dec 17 16:54:37 UTC 2007
On Monday 17 December 2007, Bogdan-Andrei Iancu wrote:
> Hi Henning,
>
> IMHO, the current approach for fixup-ing the params is good and I see
> no reason the change it. The point Juha brought in discussion was about
> complex functions where there are different types of params.
>
> But I see the following solution:
>
> - let's say we have all the generic fixup function made for param 1 (or
> no index). So, we have :
> fixup_regexp(void**param);
> fixup_int(void**param)
> fixup_str(void**param)
> fixup_pv(void**param)
>
> - and the function fixup will be something like:
> my_fixup(int index, void**param) {
> switch (index) {
> case 1:
> fixup_regexp(param);
> break;
> case 2:
> fixup_pv(param)
> break;
> }
> }
>
> What do you think about this?
That's what I proposed back then when this change was started, but it got
brushed away because people argued that they don't want to write such
wrapper functions to use the core converters. I'm still thinking this is
the most flexible way.
--
Dan
More information about the Devel
mailing list