mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 15:42:26 +02:00
/UPGRADE was broken, changed again the server connection code.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2821 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
09505d628c
commit
4aa0b9111e
11 changed files with 59 additions and 50 deletions
|
|
@ -264,6 +264,18 @@ static void server_connect_callback_readpipe(SERVER_REC *server)
|
|||
g_free(iprec.errorstr);
|
||||
}
|
||||
|
||||
SERVER_REC *server_connect(SERVER_CONNECT_REC *conn)
|
||||
{
|
||||
CHAT_PROTOCOL_REC *proto;
|
||||
SERVER_REC *server;
|
||||
|
||||
proto = CHAT_PROTOCOL(conn);
|
||||
server = proto->server_init_connect(conn);
|
||||
proto->server_connect(server);
|
||||
|
||||
return server;
|
||||
}
|
||||
|
||||
/* initializes server record but doesn't start connecting */
|
||||
void server_connect_init(SERVER_REC *server)
|
||||
{
|
||||
|
|
@ -305,16 +317,8 @@ int server_start_connect(SERVER_REC *server)
|
|||
if (!server->connrec->unix_socket && server->connrec->port <= 0)
|
||||
return FALSE;
|
||||
|
||||
server_connect_init(server);
|
||||
server->rawlog = rawlog_create();
|
||||
|
||||
if (server->connrec->session_reconnect) {
|
||||
/* /UPGRADE connection - the session_connect is meant
|
||||
for us only once, move it into server->session_connect */
|
||||
server->connrec->session_reconnect = FALSE;
|
||||
server->session_reconnect = TRUE;
|
||||
}
|
||||
|
||||
if (server->connrec->connect_handle != NULL) {
|
||||
/* already connected */
|
||||
GIOChannel *handle = server->connrec->connect_handle;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue