Skip to content

Commit

Permalink
modules/ims_usrloc_scscf: added support for UE types required by regi…
Browse files Browse the repository at this point in the history
…strar
  • Loading branch information
jaybeepee committed Feb 12, 2016
1 parent 1f8c8ef commit 6620a44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/ims_usrloc_scscf/ucontact.c
Expand Up @@ -114,6 +114,10 @@ ucontact_t* new_ucontact(str* _dom, str* _aor, str* _contact, ucontact_info_t* _
/*Copy parameter list into shm**/
param = _ci->params;
while(param) {
LM_DBG("Checking param [%.*s]\n", param->name.len, param->name.s);
if (param->name.len == 16 && (memcmp(param->name.s, "+g.3gpp.icsi-ref", 16)==0)) {
c->is_3gpp = 1;
}
/*Copy first param in curr*/
curr = shm_malloc(sizeof (param_t));
curr->len = param->len;
Expand Down
3 changes: 3 additions & 0 deletions modules/ims_usrloc_scscf/usrloc.h
Expand Up @@ -151,6 +151,8 @@ typedef enum contact_state {
/*! \brief Valid contact is a contact that either didn't expire yet or is permanent */
#define VALID_CONTACT(c, t) (((c->expires>t) || (c->expires==0)) && c->state!=CONTACT_DELETED && c->state!=CONTACT_DELETE_PENDING && c->state!=CONTACT_EXPIRE_PENDING_NOTIFY)

#define VALID_UE_TYPE(c, t) ((t==0) || (t==1 && c->is_3gpp) || (t==2 && !c->is_3gpp))

struct hslot;
/*!< Hash table slot */
struct socket_info;
Expand Down Expand Up @@ -298,6 +300,7 @@ typedef struct ucontact {
struct contact_hslot* slot; /*!< Collision slot in the hash table array we belong to */
unsigned int sl; /*!< Hash slot number we belong to */
int ref_count;
int is_3gpp;
contact_state_t state;
str domain; /*!< Pointer to domain name (NULL terminated) */
str aor; /*!< Pointer to the AOR string in record structure*/
Expand Down

0 comments on commit 6620a44

Please sign in to comment.