Module: kamailio
Branch: master
Commit: 092f3b53d6c554eed2de0d2c62093c091a7d1e89
URL:
https://github.com/kamailio/kamailio/commit/092f3b53d6c554eed2de0d2c62093c0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-04-18T14:08:49+02:00
usrloc: removed ifdefs for WITH_XAVP
---
Modified: src/modules/usrloc/ucontact.c
Modified: src/modules/usrloc/usrloc.h
---
Diff:
https://github.com/kamailio/kamailio/commit/092f3b53d6c554eed2de0d2c62093c0…
Patch:
https://github.com/kamailio/kamailio/commit/092f3b53d6c554eed2de0d2c62093c0…
---
diff --git a/src/modules/usrloc/ucontact.c b/src/modules/usrloc/ucontact.c
index 93b30fab05..fe04d2af3d 100644
--- a/src/modules/usrloc/ucontact.c
+++ b/src/modules/usrloc/ucontact.c
@@ -50,7 +50,6 @@ void ul_set_xavp_contact_clone(int v)
ul_xavp_contact_clone = v;
}
-#ifdef WITH_XAVP
/*!
* \brief Store xavp list per contact
* \param _c contact structure
@@ -74,7 +73,6 @@ void ucontact_xavp_store(ucontact_t *_c)
_c->xavp = xavp_clone_level_nodata(xavp);
return;
}
-#endif
int uldb_delete_attrs_ruid(str* _dname, str *_ruid);
@@ -135,9 +133,7 @@ ucontact_t* new_ucontact(str* _dom, str* _aor, str* _contact,
ucontact_info_t* _
c->tcpconn_id = _ci->tcpconn_id;
c->server_id = _ci->server_id;
c->keepalive = (_ci->cflags & nat_bflag)?1:0;
-#ifdef WITH_XAVP
ucontact_xavp_store(c);
-#endif
return c;
@@ -150,9 +146,7 @@ ucontact_t* new_ucontact(str* _dom, str* _aor, str* _contact,
ucontact_info_t* _
if (c->c.s) shm_free(c->c.s);
if (c->ruid.s) shm_free(c->ruid.s);
if (c->instance.s) shm_free(c->instance.s);
-#ifdef WITH_XAVP
if (c->xavp) xavp_destroy_list(&c->xavp);
-#endif
shm_free(c);
return 0;
}
@@ -173,9 +167,7 @@ void free_ucontact(ucontact_t* _c)
if (_c->c.s) shm_free(_c->c.s);
if (_c->ruid.s) shm_free(_c->ruid.s);
if (_c->instance.s) shm_free(_c->instance.s);
-#ifdef WITH_XAVP
if (_c->xavp) xavp_destroy_list(&_c->xavp);
-#endif
shm_free( _c );
}
@@ -286,7 +278,7 @@ int mem_update_ucontact(ucontact_t* _c, ucontact_info_t* _ci)
_c->received.s = 0;
_c->received.len = 0;
}
-
+
if (_ci->path) {
update_str( &_c->path, _ci->path);
} else {
@@ -295,9 +287,7 @@ int mem_update_ucontact(ucontact_t* _c, ucontact_info_t* _ci)
_c->path.len = 0;
}
-#ifdef WITH_XAVP
ucontact_xavp_store(_c);
-#endif
_c->sock = _ci->sock;
_c->expires = _ci->expires;
diff --git a/src/modules/usrloc/usrloc.h b/src/modules/usrloc/usrloc.h
index 6fb4965539..fed89d1c70 100644
--- a/src/modules/usrloc/usrloc.h
+++ b/src/modules/usrloc/usrloc.h
@@ -30,9 +30,7 @@
#include "ul_callback.h"
#include "../../core/qvalue.h"
#include "../../core/str.h"
-#ifdef WITH_XAVP
#include "../../core/xavp.h"
-#endif
#define NO_DB 0
#define WRITE_THROUGH 1
@@ -96,9 +94,7 @@ typedef struct ucontact {
int server_id; /*!< server id */
int tcpconn_id; /*!< unique tcp connection id */
int keepalive; /*!< keepalive */
-#ifdef WITH_XAVP
sr_xavp_t * xavp; /*!< per contact xavps */
-#endif
struct ucontact* next; /*!< Next contact in the linked list */
struct ucontact* prev; /*!< Previous contact in the linked list */
} ucontact_t;
@@ -124,9 +120,7 @@ typedef struct ucontact_info {
int server_id; /*!< server id */
int tcpconn_id; /*!< connection id */
int keepalive; /*!< keepalive */
-#ifdef WITH_XAVP
sr_xavp_t * xavp; /*!< per contact xavps */
-#endif
time_t last_modified; /*!< last modified */
} ucontact_info_t;