resolved then check it from the public key. Affected file is
silcd/packet_receive.c.
+ * Fixed a fatal bug in Irssi SILC client. Do not send QUIT command
+ if the server disconnected us and the connection is not valid
+ anymore. Affected file irssi/src/silc/core/silc-channels.c.
+
Thu Jun 7 08:57:16 CEST 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
* Close log file after open. Affected file
silc_command_exec(server, "JOIN", channel);
g_free(channel);
}
+
g_strfreev(list);
}
static void sig_server_quit(SILC_SERVER_REC *server, const char *msg)
{
- if (IS_SILC_SERVER(server))
+ if (IS_SILC_SERVER(server) && server->conn && server->conn->sock)
silc_command_exec(server, "QUIT", msg);
}
silc_config = silc_client_config_alloc(SILC_CLIENT_HOME_CONFIG_FILE);
/* Get user information */
-// silc_client->username = g_strdup(settings_get_str("user_name"));
- silc_client->username = strdup("priikone@pelle.palle.polle.puu");
+ silc_client->username = g_strdup(settings_get_str("user_name"));
silc_client->hostname = silc_net_localhost();
silc_client->realname = g_strdup(settings_get_str("real_name"));
hostname = silc_calloc((strlen(username) - tlen) + 1, sizeof(char));
memcpy(hostname, username + tlen + 1, strlen(username) - tlen - 1);
- pident = silc_pkcs_decode_identifier(client->data.public_key->identifier);
- if (pident) {
- phostname = strdup(pident->host);
- silc_pkcs_free_identifier(pident);
- }
-
if (strcmp(sock->hostname, sock->ip) &&
strcmp(sock->hostname, hostname)) {
silc_free(username);
- silc_free(phostname);
silc_free(hostname);
if (realname)
silc_free(realname);
return NULL;
}
+ pident = silc_pkcs_decode_identifier(client->data.public_key->identifier);
+ if (pident) {
+ phostname = strdup(pident->host);
+ silc_pkcs_free_identifier(pident);
+ }
+
if (!strcmp(sock->hostname, sock->ip) &&
phostname && strcmp(phostname, hostname)) {
silc_free(username);
- silc_free(phostname);
silc_free(hostname);
+ if (phostname)
+ silc_free(phostname);
if (realname)
silc_free(realname);
silc_server_disconnect_remote(server, sock,
/* Send some nice info to the client */
SILC_SERVER_SEND_NOTIFY(server, sock, SILC_NOTIFY_TYPE_NONE,
- ("Welcome to the SILC Network %s@%s",
- username, sock->hostname));
+ ("Welcome to the SILC Network %s",
+ username));
SILC_SERVER_SEND_NOTIFY(server, sock, SILC_NOTIFY_TYPE_NONE,
("Your host is %s, running version %s",
server->config->server_info->server_name,