[OpenSIPS-Devel] [OpenSIPS/opensips] e05c80: rr: Fix ordering issues with add_rr_param() and cr...

Liviu Chircu noreply at github.com
Thu Jun 25 19:06:53 EST 2020


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: e05c80fef27e7cab0ca706d350b94965539c4c13
      https://github.com/OpenSIPS/opensips/commit/e05c80fef27e7cab0ca706d350b94965539c4c13
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-06-25 (Thu, 25 Jun 2020)

  Changed paths:
    M modules/rr/record.c

  Log Message:
  -----------
  rr: Fix ordering issues with add_rr_param() and create_dialog()

Commits bd1719dcf and c263182ee4d introduced regressions for
record_route() and record_route_preset(), respectively, which caused
add_rr_param() to not work anymore in the following sequence of function
calls:

create_dialog() with a "dlg_match_mode" != DID_NONE
record_route() or record_route_preset()
add_rr_param() # would not do anything, simply acting as a NOP

The reason is that the "fake" lump chain which was meant to hold
all add_rr_param() operations prior to an eventual record_route() call
would no longer be masked after the record_route() and would continue to
accumulate data from subsequent add_rr_param() calls.  Since it was
meant to be a "fake" chain from the beginning (maybe the user doesn't
call record_route() at all!), the data would simply be lost.

Many thanks to John Quick for the accurate report and instructions on
how to reproduce the issue!

(cherry picked from commit e3ca95ecd0b3f33b7f42f3a7eda4a6e686cb241d)





More information about the Devel mailing list