Browse Source

minor bug fix

Jiri Kuthan 24 years ago
parent
commit
9a0ac8fb49
2 changed files with 6 additions and 1 deletions
  1. 5 1
      modules/tm/t_funcs.c
  2. 1 0
      msg_translator.c

+ 5 - 1
modules/tm/t_funcs.c

@@ -1131,8 +1131,12 @@ int add_branch_label( struct cell *trans, struct sip_msg *p_msg, int branch )
 		  MAX_BRANCH_PARAM_LEN - p_msg->add_to_branch_len,
 		 ".%h.%h.%h",
 		 trans->hash_index, trans->label, branch );
+	DBG("DEBUG: branch created now: %s (%d)\n", p_msg->add_to_branch_s, p_msg->add_to_branch_len );
 	if (n==-1) {
 		LOG(L_ERR, "ERROR: add_branch_label: too small branch buffer\n");
 		return -1;
-	} else return 0;
+	} else {
+		p_msg->add_to_branch_len += n;
+		return 0;
+	}
 }

+ 1 - 0
msg_translator.c

@@ -195,6 +195,7 @@ char * build_req_buf_from_sip_req(	struct sip_msg* msg,
 			} else DBG("DEBUG: build_req_buf_from_sip_req: required HFs for "
 					"loop checking missing\n");
 		}
+		DBG("DEBUG: will add branch now: %s (%d)\n", msg->add_to_branch_s, msg->add_to_branch_len );
 		/* someone wants me to add something to branch here ? */
 		memcpy(line_buf+via_len, msg->add_to_branch_s,
 				msg->add_to_branch_len );