From 6620a44738c68d035991df51cb915142a5d965a6 Mon Sep 17 00:00:00 2001 From: jaybeepee Date: Fri, 12 Feb 2016 20:28:49 +0200 Subject: [PATCH] modules/ims_usrloc_scscf: added support for UE types required by registrar --- modules/ims_usrloc_scscf/ucontact.c | 4 ++++ modules/ims_usrloc_scscf/usrloc.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/modules/ims_usrloc_scscf/ucontact.c b/modules/ims_usrloc_scscf/ucontact.c index de0477b35a6..971cf88dffc 100644 --- a/modules/ims_usrloc_scscf/ucontact.c +++ b/modules/ims_usrloc_scscf/ucontact.c @@ -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; diff --git a/modules/ims_usrloc_scscf/usrloc.h b/modules/ims_usrloc_scscf/usrloc.h index 2b5bf874388..2f7c0b9be8b 100644 --- a/modules/ims_usrloc_scscf/usrloc.h +++ b/modules/ims_usrloc_scscf/usrloc.h @@ -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; @@ -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*/