Browse code

- MAX_BRANCH_PARAM_LEN increased - minor 64 bit warnings fixed

Andrei Pelinescu-Onciul authored on 25/04/2005 09:06:33
Showing 2 changed files
... ...
@@ -28,6 +28,8 @@
28 28
  * --------
29 29
  * 2003-04-05  DEFAULT_*_URL introduced (jiri)
30 30
  * 2003-07-04  fixed SRV lookup prefix for TLS/sips (andrei)
31
+ * 2005-04-25  MAX_BRANCH_PARAM_LEN too small, fixed (andrei)
32
+ *
31 33
  */
32 34
 
33 35
 
... ...
@@ -176,7 +178,10 @@
176 176
 #define MCOOKIE "z9hG4bK"
177 177
 #define MCOOKIE_LEN (sizeof(MCOOKIE)-1)
178 178
 /* Maximum length of values appended to Via-branch parameter */
179
-#define MAX_BRANCH_PARAM_LEN  (MCOOKIE_LEN+48)
179
+#define MAX_BRANCH_PARAM_LEN  (MCOOKIE_LEN+8 /*int2hex*/ + 1 /*sep*/ + \
180
+								MD5_LEN + 1 /*sep*/ + 8 /*int2hex*/ + \
181
+								1 /*extra space, needed by t_calc_branch*/)
182
+
180 183
 
181 184
 
182 185
 /* maximum path length */
... ...
@@ -594,11 +594,11 @@ static inline char* append2buf( char *buf, int len, struct sip_msg *req,
594 594
 			if (ha->sval.s) {
595 595
 				avp_name.s=&ha->sval;
596 596
 				avp = search_first_avp( AVP_NAME_STR, avp_name, &avp_val);
597
-				DBG("AVP <%.*s>: %x\n",avp_name.s->len,avp_name.s->s,(unsigned int)avp);
597
+				DBG("AVP <%.*s>: %p\n",avp_name.s->len,avp_name.s->s,avp);
598 598
 			} else {
599 599
 				avp_name.n=ha->ival;
600 600
 				avp = search_first_avp( 0, avp_name, &avp_val);
601
-				DBG("AVP <%i>: %x\n",avp_name.n,(unsigned int)avp);
601
+				DBG("AVP <%i>: %p\n",avp_name.n,avp);
602 602
 			}
603 603
 			if (avp) {
604 604
 				if (avp->flags&AVP_VAL_STR) {