[Devel] Callling add_rr_param from failure_route[x]

Juha Heinanen jh at tutpro.com
Sun Sep 18 09:06:01 CEST 2005


coming back to the add_rr_param issue, bogdan said:

For the moment "add_rr_param" cannot be called from failure route due 
implementation limitations - to be able to add params after the RR was 
inserted, a pointer to the lump is kept in a static variable; when 
adding params, the lump body is modified.

In failure route there are tow problems:
    1) you cannot use anymore the static variable to identify the RR 
lump; maybe a solution will be to set type for the RR lumps and try to 
find them;
    2) altering a lump from shm mem is very problematic - all of them 
are allocated in a single mem chunk; no idea how to go around 
this.....for the moment.....

how about the following solution:

- record_route is called in branch route for each branch separately,
  i.e., there is no rr header in the request before execution of branch
  route

- instead of calling add_rr_param after record_route call, assign rr
  param into an AVP BEFORE record_route is called or give rr param as
  argument to record_route call

this should solve the above mentioned implementation problems, because
rr parameter would not need to be stored anywhere (except perhaps an
avp).

-- juha



More information about the Devel mailing list