Branch: refs/heads/2.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 618ff9254472e6f4e3c4af6f49b7513bbd49593d
      
https://github.com/OpenSIPS/opensips/commit/618ff9254472e6f4e3c4af6f49b7513bbd49593d
  Author: Bogdan-Andrei Iancu <bog...@opensips.org>
  Date:   2016-06-27 (Mon, 27 Jun 2016)

  Changed paths:
    M db/schema/dialplan.xml
    M modules/dialplan/dialplan.c
    M modules/dialplan/dp_db.c
    M scripts/dbtext/opensips/dialplan
    M scripts/mysql/dialplan-create.sql
    M scripts/postgres/dialplan-create.sql

  Log Message:
  -----------
  Fix dialplan module when using db_text backend.

The db_text makes no difference between NULL or "empty string" values in DB -> 
both are internally translated as NULL . The dialplan module, in a very abusive 
way, forces "not null" (in DB schema and in the code for data validation) even 
for columns that are optional (like subst_exp, repl_exp, timerec and attrs). 
Besides being bogus (if a column is not to be used, you have to set it to empty 
string rather than let it NULL), it makes impossible the usage of db_text with 
dialplan.
This fix allows (DB and code) the mentioned DB columns to be also NULL.
The change is backward compatible, it should not break any existing usage of 
the dialplan module.

(cherry picked from commit 8f548976389ee3968bf06f649b54d88db694f949)


_______________________________________________
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to