[asterisk-commits] russell: branch russell/smdi-1.4 r93030 - /team/russell/smdi-1.4/res/res_smdi.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 14 11:54:45 CST 2007


Author: russell
Date: Fri Dec 14 11:54:44 2007
New Revision: 93030

URL: http://svn.digium.com/view/asterisk?view=rev&rev=93030
Log:
coding guidelines fixes

Modified:
    team/russell/smdi-1.4/res/res_smdi.c

Modified: team/russell/smdi-1.4/res/res_smdi.c
URL: http://svn.digium.com/view/asterisk/team/russell/smdi-1.4/res/res_smdi.c?view=diff&rev=93030&r1=93029&r2=93030
==============================================================================
--- team/russell/smdi-1.4/res/res_smdi.c (original)
+++ team/russell/smdi-1.4/res/res_smdi.c Fri Dec 14 11:54:44 2007
@@ -130,7 +130,7 @@
 	int i;
 	
 	file = fopen(iface->name, "w");
-	if(!file) {
+	if (!file) {
 		ast_log(LOG_ERROR, "Error opening SMDI interface %s (%s) for writing\n", iface->name, strerror(errno));
 		return 1;
 	}	
@@ -139,7 +139,7 @@
 
 	fprintf(file, "OP:MWI ");
 
-	for(i = 0; i < iface->msdstrip; i++)
+	for (i = 0; i < iface->msdstrip; i++)
 	   fprintf(file, "0");
 
 	fprintf(file, "%s!\x04", mailbox);
@@ -161,7 +161,7 @@
 	int i;
 	
 	file = fopen(iface->name, "w");
-	if(!file) {
+	if (!file) {
 		ast_log(LOG_ERROR, "Error opening SMDI interface %s (%s) for writing\n", iface->name, strerror(errno));
 		return 1;
 	}	
@@ -170,7 +170,7 @@
 
 	fprintf(file, "RMV:MWI ");
 
-	for(i = 0; i < iface->msdstrip; i++)
+	for (i = 0; i < iface->msdstrip; i++)
 	   fprintf(file, "0");
 
 	fprintf(file, "%s!\x04", mailbox);
@@ -396,13 +396,13 @@
 			ASTOBJ_INIT(md_msg);
 
 			/* read the message desk number */
-			for(i = 0; i < SMDI_MESG_DESK_NUM_LEN; i++)
+			for (i = 0; i < SMDI_MESG_DESK_NUM_LEN; i++)
 				md_msg->mesg_desk_num[i] = fgetc(iface->file);
 
 			md_msg->mesg_desk_num[SMDI_MESG_DESK_NUM_LEN] = '\0';
 
 			/* read the message desk terminal number */
-			for(i = 0; i < SMDI_MESG_DESK_TERM_LEN; i++)
+			for (i = 0; i < SMDI_MESG_DESK_TERM_LEN; i++)
 				md_msg->mesg_desk_term[i] = fgetc(iface->file);
 
 			md_msg->mesg_desk_term[SMDI_MESG_DESK_TERM_LEN] = '\0';
@@ -413,13 +413,13 @@
 			/* read the forwarding station number (may be blank) */
 			cp = &md_msg->fwd_st[0];
 			for (i = 0; i < SMDI_MAX_STATION_NUM_LEN + 1; i++) {
-				if((c = fgetc(iface->file)) == ' ') {
+				if ((c = fgetc(iface->file)) == ' ') {
 					*cp = '\0';
 					break;
 				}
 
 				/* store c in md_msg->fwd_st */
-				if( i >= iface->msdstrip)
+				if ( i >= iface->msdstrip)
 					*cp++ = c;
 			}
 
@@ -526,7 +526,7 @@
 	
 	iface->thread = AST_PTHREADT_STOP;
 	
-	if(iface->file) 
+	if (iface->file) 
 		fclose(iface->file);
 	
 	ASTOBJ_CONTAINER_DESTROYALL(&iface->md_q, ast_smdi_md_message_destroy);
@@ -682,11 +682,11 @@
 		if (!strcasecmp(v->name, "baudrate")) {
 			if (!strcasecmp(v->value, "9600"))
 				baud_rate = B9600;
-			else if(!strcasecmp(v->value, "4800"))
+			else if (!strcasecmp(v->value, "4800"))
 				baud_rate = B4800;
-			else if(!strcasecmp(v->value, "2400"))
+			else if (!strcasecmp(v->value, "2400"))
 				baud_rate = B2400;
-			else if(!strcasecmp(v->value, "1200"))
+			else if (!strcasecmp(v->value, "1200"))
 				baud_rate = B1200;
 			else {
 				ast_log(LOG_NOTICE, "Invalid baud rate '%s' specified in %s (line %d), using default\n", v->value, config_file, v->lineno);




More information about the asterisk-commits mailing list