Browse code

very noisy debugging for branch

Jiri Kuthan authored on 02/12/2001 19:21:49
Showing 3 changed files
... ...
@@ -268,6 +268,7 @@ int t_forward( struct sip_msg* p_msg , unsigned int dest_ip_param , unsigned int
268 268
       T->outbound_request[branch]->to.sin_family = AF_INET;
269 269
 
270 270
       if (add_branch_label( T, p_msg , branch )==-1) return -1;
271
+      DBG("DEBUG: XXX: branch_size after call to add_branch_label: %d\n", p_msg->add_to_branch_len );
271 272
       buf = build_req_buf_from_sip_req  ( p_msg, &len);
272 273
       if (!buf)
273 274
          return -1;
... ...
@@ -1017,7 +1018,7 @@ int t_build_and_send_ACK( struct cell *Trans, unsigned int branch)
1017 1018
    p+=n;
1018 1019
 
1019 1020
    if (!check_transaction_quadruple( p_msg )) {
1020
-	LOG(L_ERR, "ERROR: t_build_and_send_ACK: can't generate a HBH ACK if key HFs in INVITE missing\n");
1021
+	LOG(L_ERR, "ERROR: t_build_and_send_ACK: cannot generate a HBH ACK if key HFs in INVITE missing\n");
1021 1022
 	goto error;
1022 1023
    }
1023 1024
 
... ...
@@ -1157,7 +1158,7 @@ int add_branch_label( struct cell *trans, struct sip_msg *p_msg, int branch )
1157 1158
 		return -1;
1158 1159
 	} else {
1159 1160
 		p_msg->add_to_branch_len += n;
1160
-		DBG("DEBUG: branch label created now: %*s (%d)\n", p_msg->add_to_branch_len, 
1161
+		DBG("DEBUG: XXX branch label created now: %*s (%d)\n", p_msg->add_to_branch_len, 
1161 1162
 			p_msg->add_to_branch_s );
1162 1163
 		return 0;
1163 1164
 	}
... ...
@@ -177,7 +177,7 @@ struct sip_msg{
177 177
 
178 178
 	/* str add_to_branch; */ /* whatever whoever want to append to branch comes here */
179 179
 	char add_to_branch_s[MAX_BRANCH_PARAM_LEN];
180
-	short add_to_branch_len;
180
+	int add_to_branch_len;
181 181
 
182 182
 	
183 183
 };
... ...
@@ -156,6 +156,7 @@ char * build_req_buf_from_sip_req(	struct sip_msg* msg,
156 156
 	/* jku: if we compute branches using MD5 it will take 32 bytes */
157 157
 	branch_len= (loop_checks ? MY_BRANCH_LEN : MY_BRANCH_LEN -1 + MD5_LEN)+
158 158
 					msg->add_to_branch_len;
159
+	DBG("DEBUG: XXX via building entered; ( branch len %d)\n", msg->add_to_branch_len );
159 160
 
160 161
 	if ((via_len+port_no_str_len+branch_len+CRLF_LEN)<MAX_VIA_LINE_SIZE){
161 162
 		memcpy(line_buf, MY_VIA, MY_VIA_LEN);
... ...
@@ -195,7 +196,7 @@ char * build_req_buf_from_sip_req(	struct sip_msg* msg,
195 196
 			} else DBG("DEBUG: build_req_buf_from_sip_req: required HFs for "
196 197
 					"loop checking missing\n");
197 198
 		}
198
-		DBG("DEBUG: will add branch now: %s (%d)\n", msg->add_to_branch_s, msg->add_to_branch_len );
199
+		DBG("DEBUG: XXX will add branch now: %s (%d)\n", msg->add_to_branch_s, msg->add_to_branch_len );
199 200
 		/* someone wants me to add something to branch here ? */
200 201
 		memcpy(line_buf+via_len, msg->add_to_branch_s,
201 202
 				msg->add_to_branch_len );
... ...
@@ -204,7 +205,6 @@ char * build_req_buf_from_sip_req(	struct sip_msg* msg,
204 205
 		memcpy(line_buf+via_len, CRLF, CRLF_LEN);
205 206
 		via_len+=CRLF_LEN;
206 207
 		line_buf[via_len]=0; /* null terminate the string*/
207
-		DBG("DEBUG: via branch building finished\n");
208 208
 	}else{
209 209
 		LOG(L_ERR, "build_req_buf_from_sip_req: ERROR: via too long (%d)\n",
210 210
 				via_len);