Skip to content

Commit

Permalink
Now really reverted :P
Browse files Browse the repository at this point in the history
git-svn-id: http://sanoi.webfactional.com/trunk@83 79def182-f41f-0410-b320-e94a04284523
  • Loading branch information
mario committed Aug 28, 2007
1 parent 04d65df commit ec54e66
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions src/tpa-connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ connection_disconnect_all()
TpaConnection *
connection_connect(gchar * account, gchar * password)
{
FamaConnection *connection, *tempconn = NULL;
FamaConnection *connection;
TpaParameter *parameter;
TpaProfile *profile;
TpaConnection *conn;
Expand Down Expand Up @@ -112,26 +112,20 @@ connection_connect(gchar * account, gchar * password)
G_CALLBACK(channel_created_cb), NULL);

/*
* Check if connection exists, otherwise connect!
* Connect!
*/
if ( connection_get_connections() != NULL)
tempconn->connection = connection_get_connection_from_account(account);
if(tempconn !=NULL &&
tpa_connection_get_protocol(conn) == tpa_connection_get_protocol(tempconn->connection)) {
conn = tempconn->connection;
} else {
tpa_connection_connect(conn);
if (connections == NULL)
connections = g_ptr_array_new();

connection = g_new(FamaConnection, 1);
connection->connection = conn;
connection->account = g_strdup_printf("%s", account);

g_ptr_array_add(connections, connection);
}

return conn;
tpa_connection_connect(conn);

if (connections == NULL)
connections = g_ptr_array_new();

connection = g_new(FamaConnection, 1);
connection->connection = conn;
connection->account = g_strdup_printf("%s", account);

g_ptr_array_add(connections, connection);

return conn;
}

void
Expand Down

0 comments on commit ec54e66

Please sign in to comment.