Bläddra i källkod

modules/ims_usrloc_pcscf: add slot id to storage

Jason Penton 10 år sedan
förälder
incheckning
9e25ba70af
2 ändrade filer med 2 tillägg och 0 borttagningar
  1. 1 0
      modules/ims_usrloc_pcscf/udomain.c
  2. 1 0
      modules/ims_usrloc_pcscf/usrloc.h

+ 1 - 0
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;

+ 1 - 0
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 */