[OpenSIPS-Devel] [OpenSIPS/opensips] 135364: fraud_detection: Add the possibility to disable stats

Liviu Chircu noreply at github.com
Thu Jul 30 14:09:26 EST 2020


  Branch: refs/heads/3.1
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 13536402f7b86b81deb9fb53963a41adc5b011b5
      https://github.com/OpenSIPS/opensips/commit/13536402f7b86b81deb9fb53963a41adc5b011b5
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2020-07-30 (Thu, 30 Jul 2020)

  Changed paths:
    M db/schema/fraud_detection.xml
    M modules/fraud_detection/fraud_detection.c
    M modules/fraud_detection/frd_events.c
    M scripts/db_berkeley/opensips/fraud_detection
    M scripts/mysql/fraud_detection-create.sql
    M scripts/oracle/fraud_detection-create.sql
    M scripts/postgres/fraud_detection-create.sql
    M scripts/sqlite/fraud_detection-create.sql

  Log Message:
  -----------
  fraud_detection: Add the possibility to disable stats

A (0) value for any of the fraud detection thresholds now means: "ignore
this threshold", instead of: "raise an event on each call for this
threshold?!".  Although (0) values could, in theory, have been useful
for event generation testing purposes before this patch, this is a small
price to pay in order to gain the ability to disable a stat.  Developers
can now add 1 more CPS and still keep testing with a new (1) value :)

Although the DB schema changes slightly, due to the added "DEFAULT 0",
it is fully backwards-compatible with the previous one, except
fraud_detection row INSERTs will now be more quiet, generating no more
warnings from the backend (e.g. "Column does not have a default
value..." -> but still defaults to 0, thanks to non-strict mode, leading
to strange warnings from the module).

Fixes #890

(cherry picked from commit 214f105ae52593bd53aef83f4426e1bbb0a09666)





More information about the Devel mailing list