Browse code

siptrace: remove bogus comments

iionita authored on 05/04/2019 14:54:30 • Henning Westerholt committed on 09/04/2019 19:25:53
Showing 3 changed files
... ...
@@ -19,7 +19,7 @@
19 19
 		The SIPtrace module offer a possibility to store incoming and outgoing SIP
20 20
 		messages in a database and/or duplicate to the capturing server (using <acronym>HEP</acronym>,
21 21
 		the Homer encapsulation protocol, or plain SIP mode). Since version 5.4 new levels of tracing
22
-		are available. Transactions and dialogs can be traced. Trace flag is now useless.
22
+		are available. Transactions and dialogs can be traced.
23 23
 	</para>
24 24
 	<para>
25 25
 		There are multiple ways of storing information:
... ...
@@ -750,6 +750,10 @@ static int fixup_siptrace(void **param, int param_no)
750 750
 		}
751 751
 
752 752
 		*param = pkg_malloc(sizeof(trace_type));
753
+		if (*param == NULL) {
754
+			LM_ERR("no more pkg memory!\n");
755
+			return -1;
756
+		}
753 757
 		memcpy(*param, &trace_type, sizeof(trace_type));
754 758
 	}
755 759
 
... ...
@@ -758,12 +762,10 @@ static int fixup_siptrace(void **param, int param_no)
758 762
 
759 763
 
760 764
 /**
761
- * TODO TODO TODO:
762 765
  *
763 766
  * parse_siptrace_uri (to replace siptrace_fixup and ki_sip_trace_dst_cid beginning)
764 767
  * parse_siptrace_type
765 768
  *
766
- *
767 769
  */
768 770
 
769 771
 static int parse_siptrace_uri(str* duri, dest_info_t* dst)
... ...
@@ -1535,7 +1537,6 @@ static void trace_onreply_out(struct cell *t, int type, struct tmcb_params *ps)
1535 1537
 
1536 1538
 	if (info->uriState == STRACE_RAW_URI) {
1537 1539
 		LM_BUG("uriState must be either UNUSED or PARSED here! must be a bug! Message won't be traced!\n");
1538
-		abort();
1539 1540
 		return;
1540 1541
 	}
1541 1542
 
... ...
@@ -268,14 +268,13 @@ int trace_send_duplicate(char *buf, int len, struct dest_info *dst2)
268 268
 
269 269
 	/* either modparam dup_uri or siptrace param dst2 */
270 270
 	if((dup_uri_str.s == 0 || dup_uri == NULL) && (dst2 == NULL)) {
271
-		LM_INFO("XXX: here s where we've got problems!\n");
271
+		LM_WARN("Neither dup_uri modparam or siptrace destination uri param used!\n");
272 272
 		return 0;
273 273
 	}
274 274
 
275 275
 	init_dest_info(&dst);
276 276
 
277 277
 	if(!dst2) {
278
-		LM_INFO("XXX: using default dup uri!\n");
279 278
 		/* create a temporary proxy from dst param */
280 279
 		dst.proto = PROTO_UDP;
281 280
 		p = mk_proxy(&dup_uri->host,