Module: kamailio
Branch: master
Commit: 9e25ba70afb7dee4da55aadb9d7a1a39c61cbedf
URL:
https://github.com/kamailio/kamailio/commit/9e25ba70afb7dee4da55aadb9d7a1a3…
Author: Jason Penton <jason.penton(a)gmail.com>
Committer: Jason Penton <jason.penton(a)gmail.com>
Date: 2015-02-03T16:42:05+02:00
modules/ims_usrloc_pcscf: add slot id to storage
---
Modified: modules/ims_usrloc_pcscf/udomain.c
Modified: modules/ims_usrloc_pcscf/usrloc.h
---
Diff:
https://github.com/kamailio/kamailio/commit/9e25ba70afb7dee4da55aadb9d7a1a3…
Patch:
https://github.com/kamailio/kamailio/commit/9e25ba70afb7dee4da55aadb9d7a1a3…
---
diff --git a/modules/ims_usrloc_pcscf/udomain.c b/modules/ims_usrloc_pcscf/udomain.c
index 6087ee1..94a72db 100644
--- a/modules/ims_usrloc_pcscf/udomain.c
+++ b/modules/ims_usrloc_pcscf/udomain.c
@@ -229,6 +229,7 @@ int mem_insert_pcontact(struct udomain* _d, str* _contact, struct
pcontact_info*
}
sl = ((*_c)->aorhash) & (_d->size - 1);
+ (*_c)->sl = sl;
slot_add(&_d->table[sl], *_c);
update_stat(_d->contacts, 1);
return 0;
diff --git a/modules/ims_usrloc_pcscf/usrloc.h b/modules/ims_usrloc_pcscf/usrloc.h
index 843827d..11bcc9d 100644
--- a/modules/ims_usrloc_pcscf/usrloc.h
+++ b/modules/ims_usrloc_pcscf/usrloc.h
@@ -185,6 +185,7 @@ typedef struct pcontact_info {
*/
typedef struct pcontact {
unsigned int aorhash; /*!< Hash over address of record */
+ unsigned int sl; /*!< slot number */
struct hslot* slot; /*!< Collision slot in the hash table array we belong to */
str* domain; /*!< Pointer to domain we belong to (null terminated string) */
str aor; /*!< Address of record */