Module: kamailio
Branch: master
Commit: acdfa070da60f6e8f1d5c9c82a394bcc0a5db041
URL:
https://github.com/kamailio/kamailio/commit/acdfa070da60f6e8f1d5c9c82a394bc…
Author: Federico Cabiddu <federico.cabiddu(a)gmail.com>
Committer: GitHub <noreply(a)github.com>
Date: 2017-11-07T13:08:10+01:00
Merge pull request #1302 from vitalikvoip/tsilo_fix
tsilo: fix internal data structures
---
Modified: src/modules/tsilo/ts_hash.c
---
Diff:
https://github.com/kamailio/kamailio/commit/acdfa070da60f6e8f1d5c9c82a394bc…
Patch:
https://github.com/kamailio/kamailio/commit/acdfa070da60f6e8f1d5c9c82a394bc…
---
diff --git a/src/modules/tsilo/ts_hash.c b/src/modules/tsilo/ts_hash.c
index 01d79940eb..fec10431ca 100644
--- a/src/modules/tsilo/ts_hash.c
+++ b/src/modules/tsilo/ts_hash.c
@@ -280,10 +280,10 @@ void remove_ts_urecord(ts_urecord_t* _r)
if (_r->next)
_r->next->prev = _r->prev;
- /* it was the last urecord */
- if (entry->n == 1) {
- entry->first = entry->last = NULL;
- }
+ if (entry->first == _r)
+ entry->first = _r->next;
+ if (entry->last == _r)
+ entry->last = _r->prev;
update_stat(stored_ruris, -1);