Browse code

minor fix: printing branch

Jiri Kuthan authored on 02/12/2001 16:01:46
Showing 3 changed files
... ...
@@ -941,6 +941,7 @@ int t_build_and_send_ACK( struct cell *Trans, unsigned int branch)
941 941
    n=snprintf( p, ack_buf + MAX_ACK_LEN - p, 
942 942
                  ".%h.%h.%h%s",
943 943
                  Trans->hash_index, Trans->label, branch, CRLF );
944
+
944 945
    if (n==-1) {
945 946
 	LOG(L_ERR, "ERROR: t_build_and_send_ACK: not enough memory for branch\n");
946 947
 	goto error;
... ...
@@ -175,7 +175,7 @@ struct sip_msg{
175 175
 	struct lump* add_rm;      /* used for all the forwarded messages */
176 176
 	struct lump* repl_add_rm; /* only for localy generated replies !!!*/
177 177
 
178
-	str add_to_branch; /* whatever whoever want to append to branch comes here */
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 180
 	short add_to_branch_len;
181 181
 
... ...
@@ -155,7 +155,7 @@ char * build_req_buf_from_sip_req(	struct sip_msg* msg,
155 155
 
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
-					msg->add_to_branch.len;
158
+					msg->add_to_branch_len;
159 159
 
160 160
 	if ((via_len+port_no_str_len+branch_len+CRLF_LEN)<MAX_VIA_LINE_SIZE){
161 161
 		memcpy(line_buf, MY_VIA, MY_VIA_LEN);
... ...
@@ -196,9 +196,9 @@ char * build_req_buf_from_sip_req(	struct sip_msg* msg,
196 196
 					"loop checking missing\n");
197 197
 		}
198 198
 		/* someone wants me to add something to branch here ? */
199
-		memcpy(line_buf+via_len, msg->add_to_branch.s,
200
-				msg->add_to_branch.len );
201
-		via_len+=msg->add_to_branch.len;
199
+		memcpy(line_buf+via_len, msg->add_to_branch_s,
200
+				msg->add_to_branch_len );
201
+		via_len+=msg->add_to_branch_len;
202 202
 
203 203
 		memcpy(line_buf+via_len, CRLF, CRLF_LEN);
204 204
 		via_len+=CRLF_LEN;