[OpenSIPS-Devel] [OpenSIPS/opensips] 0bd7fb: b2b_entities: don't try to insert in db nonprintab...

Răzvan Crainea noreply at github.com
Wed Feb 19 15:34:49 EST 2020


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 0bd7fbe7d5568f45ffbde7dd5a669fce2993b30f
      https://github.com/OpenSIPS/opensips/commit/0bd7fbe7d5568f45ffbde7dd5a669fce2993b30f
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2020-02-19 (Wed, 19 Feb 2020)

  Changed paths:
    M modules/b2b_entities/b2be_db.c

  Log Message:
  -----------
  b2b_entities: don't try to insert in db nonprintable param

The b2b_entities module expects that the parameter provided during
entity registrations to be a string. It stores this string in the
database. However, there are cases where modules (such as siprec) force
their parameter to be a pointer to a structure, therefore the string
becomes non-printable. This breaks certain entities insertion in the
database.
This commit prevents the module from inserting a key that's not
printable. In the case of siprec this is not a problem, since the module
does not rely on the value that's stored in the parameter for restart -
it rebuilds the value anyway.

This is a temorary fix - ideally, the parameter should be able to be
serialized before written in the database; although this is not possible
now, it will be possible starting with 3.1. Hence this temporary fix.





More information about the Devel mailing list