[OpenSIPS-Devel] [opensips] Fixed counter value when the key is not found. (#562)

Damien Sandrs notifications at github.com
Tue Jun 23 15:05:24 CEST 2015


It can happen that a counter value is queried before it has been set. In
that case, we should assume a default value of 0.

A typical use case is the dialog module where we could call
get_dialog_profile for a specific key before set_dialog_profile has been
called for that key. There should be no error in that case and we should
simply return a value of 0.
You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSIPS/opensips/pull/562

-- Commit Summary --

  * CacheDB_SQL: Fixed counter value when the key is not found.
  * cachedb_sql: Fixed typo.

-- File Changes --

    M modules/cachedb_sql/cachedb_sql.c (8)

-- Patch Links --

https://github.com/OpenSIPS/opensips/pull/562.patch
https://github.com/OpenSIPS/opensips/pull/562.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/pull/562
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/devel/attachments/20150623/3d28bb8c/attachment.htm>


More information about the Devel mailing list