Some code style fixes
authorMikael Hallendal <micke@imendio.com>
Thu, 28 Feb 2008 01:13:52 +0100
changeset 345 9a94f040cc56
parent 344 11473296fea5
child 347 92cbc1e51a44
Some code style fixes
loudmouth/lm-connection.c
--- a/loudmouth/lm-connection.c	Mon Feb 25 23:58:43 2008 +0100
+++ b/loudmouth/lm-connection.c	Thu Feb 28 01:13:52 2008 +0100
@@ -344,8 +344,9 @@
 	/* try using TCP keepalives if possible */
 	if ((connection->keep_alive_rate > 0) &&
 		lm_socket_set_keepalive (connection->socket,
-			connection->keep_alive_rate))
+			connection->keep_alive_rate)) {
 		return;
+	}
 
 	if (connection->keep_alive_source) {
 		connection_stop_keep_alive (connection);
@@ -458,8 +459,7 @@
 		domain = g_strdup (connection->server);
 	}
 
-	lm_verbose ("Connecting to: %s:%d\n", 
-		    connection->server, connection->port);
+	lm_verbose ("Connecting to: %s:%d\n", connection->server, connection->port);
 
 	connection->socket = lm_socket_create (connection->context,
 					       (IncomingDataFunc) connection_incoming_data,
@@ -526,7 +526,8 @@
 } AuthReqData;
 
 static void 
-auth_req_data_free (AuthReqData *data) {
+auth_req_data_free (AuthReqData *data) 
+{
 	g_free (data->username);
 	g_free (data->password);
 	g_free (data->resource);
@@ -758,8 +759,9 @@
 			    connection->stream_id);
 	}
 	
-	if (connection->state < LM_CONNECTION_STATE_OPEN)
+	if (connection->state < LM_CONNECTION_STATE_OPEN) {
 		connection->state = LM_CONNECTION_STATE_OPEN;
+	}
 	
 	/* Check to see if the stream is correctly set up */
 	result = TRUE;
@@ -774,7 +776,6 @@
 		if (cb->func) {
 		        (* ((LmResultFunction) cb->func)) (connection, result,
 			        			   cb->user_data);
-
 		}
 		_lm_utils_free_callback (cb);
 	}
@@ -1125,9 +1126,9 @@
 				_lm_connection_old_auth (connection, user, pass,
 					connection->resource, &error);
 
-				if (error)
+				if (error) {
 					g_error_free (error);
-
+				}
 			}
 
 			lm_sasl_free (connection->sasl);