[OpenSIPS-Devel] [OpenSIPS/opensips] 2d5956: Fix memory leak when ping-failed contacts unregist...

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Apr 30 06:15:56 EDT 2018


  Branch: refs/heads/2.4
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 2d5956900ab27cff1d81efe54d2c20ab6905d670
      https://github.com/OpenSIPS/opensips/commit/2d5956900ab27cff1d81efe54d2c20ab6905d670
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2018-04-30 (Mon, 30 Apr 2018)

  Changed paths:
    M modules/nathelper/nathelper.c
    M modules/nathelper/nh_table.c
    M modules/nathelper/nh_table.h
    M modules/nathelper/sip_pinger.h

  Log Message:
  -----------
  Fix memory leak when ping-failed contacts unregister.

As for the contacts with failed ping we keep the ping_cell into hash (in order to count the failures), we need a second timer list to be sure that the ping_cellis actually removed from hash as some point. Without this second list, as the ping_cell exists only in hash, if the contact is unregistered, it will never be removed.

(cherry picked from commit 8532f9ed50aef1dbbf06668dcd9cfed1702c5a7d)


  Commit: f375a3ba09ff735c204316ae223984e4918f97d7
      https://github.com/OpenSIPS/opensips/commit/f375a3ba09ff735c204316ae223984e4918f97d7
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2018-04-30 (Mon, 30 Apr 2018)

  Changed paths:
    M modules/nathelper/nathelper.c
    M modules/nathelper/nh_table.c
    M modules/nathelper/nh_table.h
    M modules/nathelper/sip_pinger.h

  Log Message:
  -----------
  Fixes related to latency and remove on timeout pinging.

* store the contact flags into ping_cell, in order to trigger proper actions upon reply / timeout
* generate latency events only if the latency flag is set
* generate latency events on ping timeout too (with 30 mins value)
* do not track/report ping failures if latency is on, but remove on timeout is not set.

(cherry picked from commit 53a8c42f5a07937bd2a4dbc0192cd662f922b528)


Compare: https://github.com/OpenSIPS/opensips/compare/34741539c3f3...f375a3ba09ff


More information about the Devel mailing list