empathy r2173 - trunk/libempathy
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2173 - trunk/libempathy
- Date: Fri, 9 Jan 2009 16:14:37 +0000 (UTC)
Author: xclaesse
Date: Fri Jan 9 16:14:37 2009
New Revision: 2173
URL: http://svn.gnome.org/viewvc/empathy?rev=2173&view=rev
Log:
Don't initialise variables by calling functions when declaring them
Signed-off-by: Sjoerd Simons <sjoerd simons collabora co uk>
Modified:
trunk/libempathy/empathy-dispatcher.c
Modified: trunk/libempathy/empathy-dispatcher.c
==============================================================================
--- trunk/libempathy/empathy-dispatcher.c (original)
+++ trunk/libempathy/empathy-dispatcher.c Fri Jan 9 16:14:37 2009
@@ -1045,14 +1045,20 @@
empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
EmpathyDispatcherRequestCb *callback, gpointer user_data)
{
- EmpathyDispatcher *dispatcher = empathy_get_dispatcher();
- EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher);
- McAccount *account = empathy_contact_get_account (contact);
- TpConnection *connection = g_hash_table_lookup (priv->accounts, account);
- ConnectionData *connection_data =
- g_hash_table_lookup (priv->connections, connection);
+ EmpathyDispatcher *dispatcher;
+ EmpathyDispatcherPriv *priv;
+ McAccount *account;
+ TpConnection *connection;
+ ConnectionData *connection_data;
DispatcherRequestData *request_data;
+ dispatcher = empathy_get_dispatcher();
+ priv = GET_PRIV (dispatcher);
+
+ account = empathy_contact_get_account (contact);
+ connection = g_hash_table_lookup (priv->accounts, account);
+ connection_data = g_hash_table_lookup (priv->connections, connection);
+
/* The contact handle might not be known yet */
request_data = new_dispatcher_request_data (dispatcher, connection,
TP_IFACE_CHANNEL_TYPE_TEXT, TP_HANDLE_TYPE_CONTACT, 0, NULL,
@@ -1122,14 +1128,20 @@
empathy_dispatcher_join_muc (McAccount *account, const gchar *roomname,
EmpathyDispatcherRequestCb *callback, gpointer user_data)
{
- EmpathyDispatcher *dispatcher = empathy_get_dispatcher();
- EmpathyDispatcherPriv *priv = GET_PRIV (dispatcher);
+ EmpathyDispatcher *dispatcher;
+ EmpathyDispatcherPriv *priv;
DispatcherRequestData *request_data;
- TpConnection *connection = g_hash_table_lookup (priv->accounts, account);
- ConnectionData *connection_data =
- g_hash_table_lookup (priv->connections, connection);
+ TpConnection *connection;
+ ConnectionData *connection_data;
const gchar *names[] = { roomname, NULL };
+ dispatcher = empathy_get_dispatcher();
+ priv = GET_PRIV (dispatcher);
+
+ connection = g_hash_table_lookup (priv->accounts, account);
+ connection_data = g_hash_table_lookup (priv->connections, connection);
+
+
/* Don't know the room handle yet */
request_data = new_dispatcher_request_data (dispatcher, connection,
TP_IFACE_CHANNEL_TYPE_TEXT, TP_HANDLE_TYPE_ROOM, 0, NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]