--- src/tp-chan.orig Mon Aug 21 20:15:50 2006 +++ src/tp-chan.c Mon Aug 21 20:17:33 2006 @@ -405,6 +405,7 @@ TpChan *tp_chan_new(DBusGConnection *con GError *error = NULL; gchar *unique_name; gchar **interfaces; + TpChan *chan; g_return_val_if_fail(connection != NULL, NULL); g_return_val_if_fail(bus_name != NULL, NULL); g_return_val_if_fail(object_path != NULL, NULL); @@ -421,10 +422,10 @@ TpChan *tp_chan_new(DBusGConnection *con } /* Create the channel object */ - TpChan *chan = g_object_new(TELEPATHY_CHAN_TYPE, - "name", unique_name, "path", object_path, - "interface", TP_IFACE_CHANNEL_INTERFACE, - "connection", connection, NULL); + chan = g_object_new(TELEPATHY_CHAN_TYPE, + "name", unique_name, "path", object_path, + "interface", TP_IFACE_CHANNEL_INTERFACE, + "connection", connection, NULL); g_free(unique_name); --- src/tp-conn.orig Mon Aug 21 20:18:30 2006 +++ src/tp-conn.c Mon Aug 21 20:19:32 2006 @@ -281,10 +281,11 @@ TpConn *tp_conn_new(DBusGConnection *con GError *error = NULL; gchar *unique_name; gchar **interfaces; + guint conn_status = TP_CONN_STATUS_DISCONNECTED; + TpConn *obj; g_return_val_if_fail(connection != NULL, NULL); g_return_val_if_fail(bus_name != NULL, NULL); g_return_val_if_fail(object_path, NULL); - guint conn_status = TP_CONN_STATUS_DISCONNECTED; /* Create the proxy object for this connection. It will be used to perform the actual method calls over D-BUS. */ @@ -299,11 +300,11 @@ TpConn *tp_conn_new(DBusGConnection *con return NULL; } - TpConn *obj = g_object_new(TELEPATHY_CONN_TYPE, - "name", unique_name, - "path", object_path, - "interface", TP_IFACE_CONN_INTERFACE, - "connection", connection, NULL); + obj = g_object_new(TELEPATHY_CONN_TYPE, + "name", unique_name, + "path", object_path, + "interface", TP_IFACE_CONN_INTERFACE, + "connection", connection, NULL); g_free(unique_name); g_datalist_init(&(obj->interface_list)); --- src/tp-connmgr.orig Mon Aug 21 20:20:04 2006 +++ src/tp-connmgr.c Mon Aug 21 20:22:11 2006 @@ -111,16 +111,17 @@ TpConnMgr *tp_connmgr_new(DBusGConnectio const char *object_path, const char *interface_name) { + TpConnMgr *obj; g_return_val_if_fail(connection != NULL, NULL); g_return_val_if_fail(bus_name != NULL, NULL); g_return_val_if_fail(object_path, NULL); g_return_val_if_fail(interface_name, NULL); - TpConnMgr *obj = g_object_new(TELEPATHY_CONNMGR_TYPE, - "name", bus_name, - "path", object_path, - "interface", interface_name, - "connection", connection, NULL); + obj = g_object_new(TELEPATHY_CONNMGR_TYPE, + "name", bus_name, + "path", object_path, + "interface", interface_name, + "connection", connection, NULL); dbus_g_proxy_add_signal(DBUS_G_PROXY(obj), "NewConnection", @@ -136,12 +137,12 @@ TpConn *tp_connmgr_new_connection(TpConn GHashTable *connection_parameters, gchar *protocol) { - g_return_val_if_fail(TELEPATHY_IS_CONNMGR(self), NULL); - g_return_val_if_fail(connection_parameters != NULL, NULL); GError *error = NULL; TpConn *tp_conn_obj = NULL; DBusGConnection *connection = tp_get_bus (); gchar *bus_name = NULL, *object_path = NULL; + g_return_val_if_fail(TELEPATHY_IS_CONNMGR(self), NULL); + g_return_val_if_fail(connection_parameters != NULL, NULL); /* Create the actual connection and acquire service and path information that the TpConn object will need */ --- tests/proto.orig Mon Aug 21 20:23:12 2006 +++ tests/proto.c Mon Aug 21 20:25:08 2006 @@ -76,6 +76,8 @@ int main(int argc, char **argv) TpConn *conn; TpChan *chan1; guint status = 1; + gchar *srcdir; + gchar *cm_path; gchar *group_if_name = g_strdup("org.freedesktop.Telepathy.Channel.Interface.Group"); @@ -99,8 +101,8 @@ int main(int argc, char **argv) } printf("connection : %p\n", connection); - gchar *srcdir = getenv ("srcdir"); - gchar *cm_path = "config/swiss.cmanager"; + srcdir = getenv ("srcdir"); + cm_path = "config/swiss.cmanager"; if (srcdir) cm_path = g_strconcat (srcdir, "/", cm_path, NULL); --- unit-tests/test-cases.orig Mon Aug 21 20:25:50 2006 +++ unit-tests/test-cases.c Mon Aug 21 20:26:27 2006 @@ -154,9 +154,9 @@ static void newconnection_handler(DBusGP gpointer user_data) { - g_print("****newconnection_handler() got called: %s %s %s\n", s1, o, s2); - int *condition = (int *)user_data; + + g_print("****newconnection_handler() got called: %s %s %s\n", s1, o, s2); /* proper tests */