Module: sip-router
Branch: master
Commit: 42063cacea9bf0f001f44b11216572b4f46e6e2d
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=42063ca…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Sat May 18 00:17:48 2013 +0100
modules/ims_registrar_scscf: use #define from core .h to specify the maximum UA length
---
modules/ims_registrar_scscf/reg_mod.h | 1 -
modules/ims_registrar_scscf/save.c | 2 +-
2 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/modules/ims_registrar_scscf/reg_mod.h
b/modules/ims_registrar_scscf/reg_mod.h
index d78e408..328d52f 100644
--- a/modules/ims_registrar_scscf/reg_mod.h
+++ b/modules/ims_registrar_scscf/reg_mod.h
@@ -62,7 +62,6 @@
#define USERNAME_MAX_SIZE 64
#define DOMAIN_MAX_SIZE 128
#define CALLID_MAX_SIZE 255
-#define UA_MAX_SIZE 255
#define PATH_MODE_STRICT 2
#define PATH_MODE_LAZY 1
diff --git a/modules/ims_registrar_scscf/save.c b/modules/ims_registrar_scscf/save.c
index 827f63e..4eb8ab5 100644
--- a/modules/ims_registrar_scscf/save.c
+++ b/modules/ims_registrar_scscf/save.c
@@ -259,7 +259,7 @@ static inline ucontact_info_t* pack_ci(struct sip_msg* _m, contact_t*
_c, unsign
/* additional info from message */
if (parse_headers(_m, HDR_USERAGENT_F, 0) != -1 && _m->user_agent
- && _m->user_agent->body.len > 0 &&
_m->user_agent->body.len < UA_MAX_SIZE) {
+ && _m->user_agent->body.len > 0 &&
_m->user_agent->body.len < MAX_UA_SIZE) {
ci.user_agent = &_m->user_agent->body;
} else {
ci.user_agent = &no_ua;