浏览代码

kex: coherent indentation and white spacing

Daniel-Constantin Mierla 9 年之前
父节点
当前提交
385e8d4467

+ 2 - 2
modules/kex/core_stats.c

@@ -54,7 +54,7 @@ stat_var* err_rpls;				/*!< error replies            */
 stat_var* bad_URIs;				/*!< number of bad URIs       */
 stat_var* unsupported_methods;			/*!< unsupported methods      */
 stat_var* bad_msg_hdr;				/*!< messages with bad header */
- /*! received requests by method  */
+/*! received requests by method  */
 stat_var* rcv_reqs_invite;
 stat_var* rcv_reqs_cancel;
 stat_var* rcv_reqs_ack;
@@ -652,7 +652,7 @@ inline static int mi_add_stat(struct mi_node *rpl, stat_var *stat)
 static void mi_add_grp_vars_cbk(void* r, str* g, str* n, counter_handle_t h)
 {
 	struct mi_node *rpl;
-	
+
 	rpl = r;
 	addf_mi_node_child(rpl, 0, 0, 0, "%.*s:%.*s = %lu",
 							g->len, g->s, n->len, n->s, counter_get_val(h));

+ 1 - 1
modules/kex/core_stats.h

@@ -96,7 +96,7 @@ extern stat_var* unsupported_methods;
 
 /*! \brief Set in get_hdr_field(). */
 extern stat_var* bad_msg_hdr;
- 
+
 int register_mi_stats(void);
 int register_core_stats(void);
 

+ 20 - 3
modules/kex/flags.c

@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
@@ -28,6 +28,9 @@
 #include "../../mod_fix.h"
 #include "flags.h"
 
+/**
+ *
+ */
 int w_issflagset(struct sip_msg *msg, char *flag, str *s2)
 {
 	int fval=0;
@@ -41,6 +44,9 @@ int w_issflagset(struct sip_msg *msg, char *flag, str *s2)
 	return issflagset((flag_t)fval);
 }
 
+/**
+ *
+ */
 int w_resetsflag(struct sip_msg *msg, char *flag, str *s2)
 {
 	int fval=0;
@@ -54,6 +60,9 @@ int w_resetsflag(struct sip_msg *msg, char *flag, str *s2)
 	return resetsflag((flag_t)fval);
 }
 
+/**
+ *
+ */
 int w_setsflag(struct sip_msg *msg, char *flag, char *s2)
 {
 	int fval=0;
@@ -67,6 +76,9 @@ int w_setsflag(struct sip_msg *msg, char *flag, char *s2)
 	return setsflag((flag_t)fval);
 }
 
+/**
+ *
+ */
 int w_isbflagset(struct sip_msg *msg, char *flag, str *idx)
 {
 	int fval=0;
@@ -91,6 +103,9 @@ int w_isbflagset(struct sip_msg *msg, char *flag, str *idx)
 	return isbflagset(ival, (flag_t)fval);
 }
 
+/**
+ *
+ */
 int w_resetbflag(struct sip_msg *msg, char *flag, str *idx)
 {
 		int fval=0;
@@ -116,6 +131,9 @@ int w_resetbflag(struct sip_msg *msg, char *flag, str *idx)
 
 }
 
+/**
+ *
+ */
 int w_setbflag(struct sip_msg *msg, char *flag, char *idx)
 {
 	int fval=0;
@@ -139,4 +157,3 @@ int w_setbflag(struct sip_msg *msg, char *flag, char *idx)
 	}
 	return setbflag(ival, (flag_t)fval);
 }
-

+ 2 - 2
modules/kex/flags.h

@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 

+ 2 - 2
modules/kex/kex_mod.c

@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 

+ 4 - 4
modules/kex/km_core.c

@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
@@ -38,7 +38,7 @@ int w_setdsturi(struct sip_msg *msg, char *uri, str *s2)
 	/* todo: fixup */
 	s.s = uri;
 	s.len = strlen(uri);
-	
+
 	if(set_dst_uri(msg, &s)!=0)
 		return -1;
 	/* dst_uri changes, so it makes sense to re-use the current uri for
@@ -69,7 +69,7 @@ int pv_printf_fixup(void** param, int param_no)
 	pv_spec_t *spec=NULL;
 	pv_elem_t *pvmodel=NULL;
 	str tstr;
-	
+
 	if(param_no==1)
 	{
 		spec = (pv_spec_t*)pkg_malloc(sizeof(pv_spec_t));

+ 2 - 2
modules/kex/km_core.h

@@ -13,8 +13,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 

+ 8 - 10
modules/kex/mi_core.c

@@ -21,8 +21,8 @@
 
 
 /*!
- * \file 
- * \brief MI :: Core 
+ * \file
+ * \brief MI :: Core
  * \ingroup mi
  */
 
@@ -133,26 +133,24 @@ static struct mi_root *mi_version(struct mi_root *cmd, void *param)
 
 	node = add_mi_node_child( rpl, 0, MI_SSTR("Server"), SERVER_HDR+8,
 		SERVER_HDR_LEN-8);
-	if (node==0) 
+	if (node==0)
 		goto error;
 
 	node = add_mi_node_child( rpl, 0, MI_SSTR("Build"), BUILD_STR,
 			BUILD_STR_LEN);
-	if (node==0) 
+	if (node==0)
 		goto error;
 
 	node = add_mi_node_child( rpl, 0, MI_SSTR("Flags"), (char*)ver_flags,
 				strlen(ver_flags));
-	if (node==0) 
-		goto error;	
-	
+	if (node==0)
+		goto error;
+
 	node = add_mi_node_child( rpl, 0, MI_SSTR("GIT"), (char*)repo_hash,
 			strlen(repo_hash));
-	if (node==0) 
+	if (node==0)
 		goto error;
 
-		
-	
 	return rpl_tree;
 error:
 	LM_ERR("failed to add node\n");

+ 1 - 1
modules/kex/mi_core.h

@@ -20,7 +20,7 @@
  */
 
 /*!
- * \file 
+ * \file
  * \brief MI :: Core
  * \ingroup mi
  */

+ 5 - 5
modules/kex/mod_stats.c

@@ -159,7 +159,7 @@ static int rpc_mod_print_one(rpc_t *rpc, void *ctx, const char *mname,
 
 /* print memory info for all modules */
 static int rpc_mod_print_all(rpc_t *rpc, void *ctx,
-	mem_counter *pkg_stats, mem_counter *shm_stats, int flag)
+		mem_counter *pkg_stats, mem_counter *shm_stats, int flag)
 {
 	mem_counter *pkg_iter = pkg_stats;
 	mem_counter *shm_iter = shm_stats;
@@ -167,7 +167,7 @@ static int rpc_mod_print_all(rpc_t *rpc, void *ctx,
 	/* print unique module info found in pkg_stats */
 	while (pkg_iter) {
 		if (!rpc_mod_is_printed_one(pkg_stats, pkg_iter)) {
-		   rpc_mod_print_one(rpc, ctx,
+			rpc_mod_print_one(rpc, ctx,
 				pkg_iter->mname, pkg_stats, shm_stats, flag);
 		}
 		pkg_iter = pkg_iter->next;
@@ -175,9 +175,9 @@ static int rpc_mod_print_all(rpc_t *rpc, void *ctx,
 
 	/* print unique module info found in shm_stats and not found in pkg_stats */
 	while (shm_iter) {
-		if (!rpc_mod_is_printed_one(shm_stats, shm_iter) &&
-			!rpc_mod_is_printed_one(pkg_stats, shm_iter)) {
-		   rpc_mod_print_one(rpc, ctx,
+		if (!rpc_mod_is_printed_one(shm_stats, shm_iter)
+				&& !rpc_mod_is_printed_one(pkg_stats, shm_iter)) {
+			rpc_mod_print_one(rpc, ctx,
 				shm_iter->mname, pkg_stats, shm_stats, flag);
 		}
 		shm_iter = shm_iter->next;