[OpenSIPS-Devel] [OpenSIPS/opensips] 5dd797: [core] proper re-init of cfg parser during reload_...

Bogdan Andrei IANCU noreply at github.com
Mon Nov 1 15:24:53 EST 2021


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 5dd7976c03b6364f307b993bfdff1d8c1c010aa0
      https://github.com/OpenSIPS/opensips/commit/5dd7976c03b6364f307b993bfdff1d8c1c010aa0
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2021-11-01 (Mon, 01 Nov 2021)

  Changed paths:
    M cfg_pp.c

  Log Message:
  -----------
  [core] proper re-init of cfg parser during reload_routes

The lex parser needs an explicit reset/init after a parsing attempt completed with a parsing error. This is needed to be able to start a new parting session, via the route_reload MI cmd


  Commit: 52e51809ca219c97ea9e348f5dab6a109859eece
      https://github.com/OpenSIPS/opensips/commit/52e51809ca219c97ea9e348f5dab6a109859eece
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2021-11-01 (Mon, 01 Nov 2021)

  Changed paths:
    M cfg_pp.c

  Log Message:
  -----------
  [core] fix printing cfg file context for errors after a reload_routes

Reset the file context list each time a new cfg parsing starts, to be sure we do not inherite the context from a previous parsing.
If we do not do this, when doing a reload_routes, if an parsing error occurs, we will get references and dumps (of the faulty lines) from the original, startup script, not from the reloaded one.


Compare: https://github.com/OpenSIPS/opensips/compare/cfbdb37db378...52e51809ca21



More information about the Devel mailing list