Browse code

modules/ims_registrar_scscf: use #define from core .h to specify the maximum UA length

Peter Dunkley authored on 17/05/2013 23:17:48
Showing 2 changed files
... ...
@@ -62,7 +62,6 @@
62 62
 #define USERNAME_MAX_SIZE      64
63 63
 #define DOMAIN_MAX_SIZE        128
64 64
 #define CALLID_MAX_SIZE        255
65
-#define UA_MAX_SIZE            255
66 65
 
67 66
 #define PATH_MODE_STRICT	2
68 67
 #define PATH_MODE_LAZY		1
... ...
@@ -259,7 +259,7 @@ static inline ucontact_info_t* pack_ci(struct sip_msg* _m, contact_t* _c, unsign
259 259
 
260 260
         /* additional info from message */
261 261
         if (parse_headers(_m, HDR_USERAGENT_F, 0) != -1 && _m->user_agent
262
-                && _m->user_agent->body.len > 0 && _m->user_agent->body.len < UA_MAX_SIZE) {
262
+                && _m->user_agent->body.len > 0 && _m->user_agent->body.len < MAX_UA_SIZE) {
263 263
             ci.user_agent = &_m->user_agent->body;
264 264
         } else {
265 265
             ci.user_agent = &no_ua;