Browse Source

tm: add missing line breaks in log statements

Henning Westerholt 6 years ago
parent
commit
09b36467b2

+ 1 - 1
src/modules/tm/dlg.c

@@ -117,7 +117,7 @@ int register_dlg_tmcb(int types, dlg_t *dlg, transaction_cb f, void *param)
 		return E_BUG;
 	}
 	if(f == 0) {
-		LM_CRIT("null callback function");
+		LM_CRIT("null callback function\n");
 		return E_BUG;
 	}
 	return insert_tmcb(&dlg->dlg_callbacks, types, f, param, NULL);

+ 11 - 11
src/modules/tm/rpc_uac.c

@@ -602,28 +602,28 @@ static int t_uac_check_msg(struct sip_msg* msg,
 	char ch;
 
 	if (body->len && !msg->content_type) {
-		LM_ERR("Content-Type missing");
+		LM_ERR("Content-Type missing\n");
 		goto err;
 	}
 
 	if (body->len && msg->content_length) {
-		LM_ERR("Content-Length disallowed");
+		LM_ERR("Content-Length disallowed\n");
 		goto err;
 	}
 
 	if (!msg->to) {
-		LM_ERR("To missing");
+		LM_ERR("To missing\n");
 		goto err;
 	}
 
 	if (!msg->from) {
-		LM_ERR("From missing");
+		LM_ERR("From missing\n");
 		goto err;
 	}
 
 	/* we also need to know if there is from-tag and add it otherwise */
 	if (parse_from_header(msg) < 0) {
-		LM_ERR("Error in From");
+		LM_ERR("Error in From\n");
 		goto err;
 	}
 
@@ -640,14 +640,14 @@ static int t_uac_check_msg(struct sip_msg* msg,
 			} else {
 				DBG("check_msg: Found non-numerical in CSeq: <%i>='%c'\n",
 						(unsigned int)ch, ch);
-				LM_ERR("Non-numerical CSeq");
+				LM_ERR("Non-numerical CSeq\n");
 				goto err;
 			}
 		}
 
 		if (parsed_cseq->method.len != method->len ||
 				memcmp(parsed_cseq->method.s, method->s, method->len) !=0 ) {
-			LM_ERR("CSeq method mismatch");
+			LM_ERR("CSeq method mismatch\n");
 			goto err;
 		}
 	} else {
@@ -684,7 +684,7 @@ int t_uac_send(str *method, str *ruri, str *nexthop, str *send_socket,
 
 	/* check and parse parameters */
 	if (method->len<=0){
-		LM_ERR("Empty method");
+		LM_ERR("Empty method\n");
 		return -1;
 	}
 	if (parse_uri(ruri->s, ruri->len, &p_uri)<0){
@@ -724,7 +724,7 @@ int t_uac_send(str *method, str *ruri, str *nexthop, str *send_socket,
 	faked_msg.len=headers->len;
 	faked_msg.buf=faked_msg.unparsed=headers->s;
 	if (parse_headers(&faked_msg, HDR_EOH_F, 0)==-1){
-		LM_ERR("Invalid headers");
+		LM_ERR("Invalid headers\n");
 		return -1;
 	}
 	/* at this moment all the parameters are parsed => more sanity checks */
@@ -735,7 +735,7 @@ int t_uac_send(str *method, str *ruri, str *nexthop, str *send_socket,
 	}
 	if(get_hfblock(nexthop->len? nexthop: ruri, faked_msg.headers,
 			PROTO_NONE, ssock, &hfb)<0) {
-		LM_ERR("failed to get the block of headers");
+		LM_ERR("failed to get the block of headers\n");
 		goto error;
 	}
 	/* proceed to transaction creation */
@@ -773,7 +773,7 @@ int t_uac_send(str *method, str *ruri, str *nexthop, str *send_socket,
 	ret = t_uac(&uac_req);
 
 	if (ret <= 0) {
-		LM_ERR("UAC error");
+		LM_ERR("UAC error\n");
 		goto error01;
 	}
 error01:

+ 1 - 1
src/modules/tm/t_fwd.c

@@ -1220,7 +1220,7 @@ static struct cancel_reason* cancel_reason_pack(short cause, void* data,
 			if (unlikely(code_len==0)) {
 				shm_free(cr);
 				cr = 0;
-				LM_CRIT("not enough space to write reason code");
+				LM_CRIT("not enough space to write reason code\n");
 				goto error;
 			}
 			d+=code_len;

+ 1 - 1
src/modules/tm/t_msgbuilder.c

@@ -680,7 +680,7 @@ static inline int get_uac_rs(sip_msg_t *msg, int is_req, struct rte **rtset)
 				 * rte list is evaluated => must do a copy of it */
 				if (duplicate_rr(&new_p, p) < 0) {
 					pkg_free(t);
-					LM_ERR("failed to duplicate RR");
+					LM_ERR("failed to duplicate RR\n");
 					goto err;
 				}
 				t->ptr = new_p;

+ 1 - 1
src/modules/tm/t_suspend.c

@@ -407,7 +407,7 @@ int t_continue_helper(unsigned int hash_index, unsigned int label,
 			exec_post_script_cb(t->uac[branch].reply, cb_type);
 		}
 
-		LM_DBG("restoring previous environment");
+		LM_DBG("restoring previous environment\n");
 		faked_env( t, 0, 1);
 
 		/*lock transaction replies - will be unlocked when reply is relayed*/

+ 7 - 7
src/modules/tm/tm.c

@@ -1828,7 +1828,7 @@ static int w_t_replicate_uri(struct sip_msg  *msg ,
 
 	if(fixup_get_svalue(msg, (gparam_p)uri, &suri)!=0)
 	{
-		LM_ERR("invalid replicate uri parameter");
+		LM_ERR("invalid replicate uri parameter\n");
 		return -1;
 	}
 	return t_replicate_uri(msg, &suri);
@@ -2651,27 +2651,27 @@ static int w_t_uac_send(sip_msg_t* msg, char* pmethod, char* pruri,
 	str body = STR_NULL;
 
 	if(fixup_get_svalue(msg, (gparam_t*)pmethod, &method)!=0) {
-		LM_ERR("invalid method parameter");
+		LM_ERR("invalid method parameter\n");
 		return -1;
 	}
 	if(fixup_get_svalue(msg, (gparam_t*)pruri, &ruri)!=0) {
-		LM_ERR("invalid ruri parameter");
+		LM_ERR("invalid ruri parameter\n");
 		return -1;
 	}
 	if(fixup_get_svalue(msg, (gparam_t*)pnexthop, &nexthop)!=0) {
-		LM_ERR("invalid nexthop parameter");
+		LM_ERR("invalid nexthop parameter\n");
 		return -1;
 	}
 	if(fixup_get_svalue(msg, (gparam_t*)psock, &send_socket)!=0) {
-		LM_ERR("invalid send socket parameter");
+		LM_ERR("invalid send socket parameter\n");
 		return -1;
 	}
 	if(fixup_get_svalue(msg, (gparam_t*)phdrs, &headers)!=0) {
-		LM_ERR("invalid headers parameter");
+		LM_ERR("invalid headers parameter\n");
 		return -1;
 	}
 	if(fixup_get_svalue(msg, (gparam_t*)pbody, &body)!=0) {
-		LM_ERR("invalid body parameter");
+		LM_ERR("invalid body parameter\n");
 		return -1;
 	}
 

+ 2 - 2
src/modules/tm/uac.c

@@ -240,7 +240,7 @@ static inline int t_run_local_req(
 		return -1;
 	}
 	if (unlikely(set_dst_uri(&lreq, uac_r->dialog->hooks.next_hop))) {
-		LM_ERR("failed to set dst_uri");
+		LM_ERR("failed to set dst_uri\n");
 		free_sip_msg(&lreq);
 		return -1;
 	}
@@ -835,7 +835,7 @@ int ack_local_uac(struct cell *trans, str *hdrs, str *body)
 
 	if (! (local_ack = local_ack_rb(trans->uac[0].reply, trans, /*branch*/0,
 			hdrs, body))) {
-		LM_ERR("failed to build ACK retransmission buffer");
+		LM_ERR("failed to build ACK retransmission buffer\n");
 		RET_INVALID;
 	} else {
 		/* set the new buffer, but only if not already set (conc. invok.) */