[OpenSIPS-Devel] [OpenSIPS/opensips] 2e5160: cachedb_mongodb: Fix crash when losing DB connecti...

Liviu Chircu liviu at opensips.org
Fri Jan 8 14:33:52 CET 2016


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 2e5160e5e1d895a5694ba4297058e1ca587e787a
      https://github.com/OpenSIPS/opensips/commit/2e5160e5e1d895a5694ba4297058e1ca587e787a
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2016-01-08 (Fri, 08 Jan 2016)

  Changed paths:
    M modules/cachedb_mongodb/cachedb_mongodb_dbase.c

  Log Message:
  -----------
  cachedb_mongodb: Fix crash when losing DB connection

Tested with mongo-c-driver v0.6. It turns out that the driver's
mongo_cmd_get_last_error() does not always return an iterable bson
structure. This patch adds a safety check, so that iteration is skipped.

Reported by Sasmita Panda
Closes issue #747




More information about the Devel mailing list