2
0
Эх сурвалжийг харах

topoh: coherent whitespacing and indentation

Daniel-Constantin Mierla 8 жил өмнө
parent
commit
66ab19a010

+ 1 - 1
src/modules/topoh/Makefile

@@ -1,7 +1,7 @@
 #
 # topoh module makefile
 #
-# 
+#
 # WARNING: do not run this directly, it should be run by the master Makefile
 
 include ../../Makefile.defs

+ 1 - 1
src/modules/topoh/api.h

@@ -19,7 +19,7 @@
 
 /*!
  * \file
- * \brief Kamailio topoh :: 
+ * \brief Kamailio topoh ::
  * \ingroup topoh
  * Module: \ref topoh
  */

+ 12 - 13
src/modules/topoh/doc/topoh.xml

@@ -9,29 +9,28 @@
 ]>
 
 <book xmlns:xi="http://www.w3.org/2001/XInclude">
-    <bookinfo>
+	<bookinfo>
 	<title>topoh Module</title>
 	<productname class="trade">sip-router.org</productname>
 	<authorgroup>
-	    <author>
+		<author>
 		<firstname>Daniel-Constantin</firstname>
 		<surname>Mierla</surname>
 		<email>[email protected]</email>
-	    </author>
-	    <editor>
+		</author>
+		<editor>
 		<firstname>Daniel-Constantin</firstname>
 		<surname>Mierla</surname>
 		<email>[email protected]</email>
-	    </editor>
+		</editor>
 	</authorgroup>
 	<copyright>
-	    <year>2009</year>
-	    <holder>&fhg;</holder>
+		<year>2009</year>
+		<holder>&fhg;</holder>
 	</copyright>
-    </bookinfo>
-    <toc></toc>
-    
-    <xi:include href="topoh_admin.xml"/>
-    
-    
+	</bookinfo>
+	<toc></toc>
+
+	<xi:include href="topoh_admin.xml"/>
+
 </book>

+ 1 - 1
src/modules/topoh/th_mask.c

@@ -18,7 +18,7 @@
  */
 /*!
  * \file
- * \brief Kamailio topoh :: 
+ * \brief Kamailio topoh ::
  * \ingroup topoh
  * Module: \ref topoh
  */

+ 1 - 1
src/modules/topoh/th_mask.h

@@ -19,7 +19,7 @@
 
 /*!
  * \file
- * \brief SIP-router topoh :: 
+ * \brief SIP-router topoh ::
  * \ingroup topoh
  * Module: \ref topoh
  */

+ 26 - 26
src/modules/topoh/th_msg.c

@@ -100,7 +100,7 @@ int th_get_param_value(str *in, str *name, str *value)
 			return 0;
 		}
 	}
-	
+
 	if(params) free_params(params);
 	return 1;
 
@@ -188,7 +188,7 @@ int th_mask_via(sip_msg_t *msg)
 					LM_ERR("cannot encode via %d\n", i);
 					return -1;
 				}
-					
+
 				LM_DBG("+body: %d: [%.*s]\n", out.len, out.len, out.s);
 				l=del_lump(msg, via->name.s-msg->buf, vlen, 0);
 				if (l==0)
@@ -221,7 +221,7 @@ int th_mask_callid(sip_msg_t *msg)
 		LM_ERR("cannot get Call-Id header\n");
 		return -1;
 	}
-				
+
 	out.s = th_mask_encode(msg->callid->body.s, msg->callid->body.len,
 				&th_callid_prefix, &out.len);
 	if(out.s==NULL)
@@ -229,7 +229,7 @@ int th_mask_callid(sip_msg_t *msg)
 		LM_ERR("cannot encode callid\n");
 		return -1;
 	}
-				
+
 	l=del_lump(msg, msg->callid->body.s-msg->buf, msg->callid->body.len, 0);
 	if (l==0)
 	{
@@ -254,7 +254,7 @@ int th_mask_contact(sip_msg_t *msg)
 	char *p;
 	contact_t *c;
 
-	if(msg->contact==NULL) 
+	if(msg->contact==NULL)
 	{
 		LM_DBG("no contact header\n");
 		return 0;
@@ -265,7 +265,7 @@ int th_mask_contact(sip_msg_t *msg)
 		LM_ERR("failed parsing contact header\n");
 		return -1;
 	}
-	
+
 	c = ((contact_body_t*)msg->contact->parsed)->contacts;
 	in = c->uri;
 
@@ -293,7 +293,7 @@ int th_mask_contact(sip_msg_t *msg)
 		out.s = p;
 		out.len += 2;
 	}
-				
+
 	l=del_lump(msg, in.s-msg->buf, in.len, 0);
 	if (l==0)
 	{
@@ -325,9 +325,9 @@ int th_mask_record_route(sip_msg_t *msg)
 	}
 	hdr = msg->record_route;
 	i = 0;
-	while(hdr!=NULL) 
+	while(hdr!=NULL)
 	{
-		if (parse_rr(hdr) < 0) 
+		if (parse_rr(hdr) < 0)
 		{
 			LM_ERR("failed to parse RR\n");
 			return -1;
@@ -416,7 +416,7 @@ int th_unmask_via(sip_msg_t *msg, str *cookie)
 					LM_ERR("cannot decode via %d\n", i);
 					return -1;
 				}
-					
+
 				LM_DBG("+body: %d: [%.*s]\n", out.len, out.len, out.s);
 				if(i==2)
 				{
@@ -428,7 +428,7 @@ int th_unmask_via(sip_msg_t *msg, str *cookie)
 						return -1;
 
 					}
-					
+
 					memset(via2, 0, sizeof(struct via_body));
 					memcpy(out.s+out.len, CRLF, CRLF_LEN);
 					out.s[out.len+CRLF_LEN]='X';
@@ -475,10 +475,10 @@ int th_unmask_callid(sip_msg_t *msg)
 {
 	struct lump* l;
 	str out;
-	
+
 	if(th_param_mask_callid==0)
 		return 0;
-	
+
 	if(msg->callid==NULL)
 	{
 		LM_ERR("cannot get Call-Id header\n");
@@ -492,7 +492,7 @@ int th_unmask_callid(sip_msg_t *msg)
 		LM_DBG("call-id [%.*s] not encoded",msg->callid->body.len,msg->callid->body.s);
 		return 0;
 	}
-				
+
 	out.s = th_mask_decode(msg->callid->body.s, msg->callid->body.len,
 					&th_callid_prefix, 0, &out.len);
 	if(out.s==NULL)
@@ -500,7 +500,7 @@ int th_unmask_callid(sip_msg_t *msg)
 		LM_ERR("cannot decode callid\n");
 		return -1;
 	}
-				
+
 	l=del_lump(msg, msg->callid->body.s-msg->buf, msg->callid->body.len, 0);
 	if (l==0)
 	{
@@ -580,9 +580,9 @@ int th_flip_record_route(sip_msg_t *msg, int mode)
 	act = 0;
 	if(mode==1)
 		act = 2;
-	while(hdr!=NULL) 
+	while(hdr!=NULL)
 	{
-		if (parse_rr(hdr) < 0) 
+		if (parse_rr(hdr) < 0)
 		{
 			LM_ERR("failed to parse RR\n");
 			return -1;
@@ -673,9 +673,9 @@ int th_unmask_route(sip_msg_t *msg)
 	}
 	hdr = msg->route;
 	i = 0;
-	while(hdr!=NULL) 
+	while(hdr!=NULL)
 	{
-		if (parse_rr(hdr) < 0) 
+		if (parse_rr(hdr) < 0)
 		{
 			LM_ERR("failed to parse RR\n");
 			return -1;
@@ -691,7 +691,7 @@ int th_unmask_route(sip_msg_t *msg)
 				if (th_uri_prefix_checks
 						&& ((rr->nameaddr.uri.len<th_uri_prefix.len) ||
 						(strncasecmp(rr->nameaddr.uri.s,th_uri_prefix.s,
-									 th_uri_prefix.len)!=0)))
+									th_uri_prefix.len)!=0)))
 				{
 					LM_DBG("rr %d is not encoded: [%.*s]", i,
 							rr->nameaddr.uri.len, rr->nameaddr.uri.s);
@@ -702,7 +702,7 @@ int th_unmask_route(sip_msg_t *msg)
 				if(th_get_uri_param_value(&rr->nameaddr.uri, &th_uparam_name,
 							&eval)<0 || eval.len<=0)
 					return -1;
-	
+
 				out.s = th_mask_decode(eval.s, eval.len,
 							&th_uparam_prefix, 0, &out.len);
 
@@ -742,7 +742,7 @@ int th_unmask_ruri(sip_msg_t *msg)
 	/* Do nothing if ruri is not encoded */
 	if (th_uri_prefix_checks && ((REQ_LINE(msg).uri.len<th_uri_prefix.len) ||
 			(strncasecmp(REQ_LINE(msg).uri.s, th_uri_prefix.s,
-						 th_uri_prefix.len)!=0)))
+						th_uri_prefix.len)!=0)))
 	{
 		LM_DBG("ruri [%.*s] is not encoded",REQ_LINE(msg).uri.len,REQ_LINE(msg).uri.s);
 		return 0;
@@ -751,7 +751,7 @@ int th_unmask_ruri(sip_msg_t *msg)
 	if(th_get_uri_param_value(&REQ_LINE(msg).uri, &th_uparam_name, &eval)<0
 			|| eval.len<=0)
 		return -1;
-	
+
 	out.s = th_mask_decode(eval.s, eval.len,
 				&th_uparam_prefix, 0, &out.len);
 	if(out.s==NULL)
@@ -759,7 +759,7 @@ int th_unmask_ruri(sip_msg_t *msg)
 		LM_ERR("cannot decode r-uri\n");
 		return -1;
 	}
-					
+
 	LM_DBG("+decoded: %d: [%.*s]\n", out.len, out.len, out.s);
 	l=del_lump(msg, REQ_LINE(msg).uri.s-msg->buf, REQ_LINE(msg).uri.len, 0);
 	if (l==0)
@@ -941,7 +941,7 @@ int th_add_via_cookie(sip_msg_t *msg, struct via_body *via)
 		LM_ERR("failed adding cookie to via [%p]\n", via);
 		return -1;
 	}
-	
+
 	out.len = 1+th_cookie_name.len+1+th_cookie_value.len+1;
 	out.s = (char*)pkg_malloc(out.len+1);
 	if(out.s==0)
@@ -1141,7 +1141,7 @@ int th_route_direction(sip_msg_t *msg)
 		LM_DBG("no route header - downstream\n");
 		return 0;
 	}
-	if (parse_rr(msg->route) < 0) 
+	if (parse_rr(msg->route) < 0)
 	{
 		LM_ERR("failed to parse route header\n");
 		return -1;