not re-create the channel to avoid duplicates.
+Sat Sep 7 22:26:50 EEST 2002 Pekka Riikonen <priikone@silcnet.org>
+
+ * If normal server is standalone and found existing but disabled
+ channel, do not re-create the channel since it creates
+ duplicate same channels. Affected file silcd/server.c.
+
Sat Sep 7 16:02:09 EEST 2002 Pekka Riikonen <priikone@silcnet.org>
* In JOIN notify handling, mark that the cache entry of the
TODO/bugs in Irssi SILC client
==============================
- o /NAMES list is not emptied when /LEAVEin the channel.
-
o UTF-8 encode/decode WHOIS userinfos, topic, etc.
o Add STATS.
TODO/bugs In SILC Server
========================
+ o Backup router can accidently free its own id_entry and ID? Could happen
+ when some server is connecting and connecting fails (like too many
+ connections, etc). Some weird crashes relating to this occurred.
+
o Implement the <Requested Attributes> and the Attribute Payload to
the core library, client and server. Maybe implementations of
RFC 2425 and RFC 2426 to make it complete.
if (!channel ||
(channel->disabled && server->server_type != SILC_ROUTER)) {
- /* Channel not found */
+ /* Channel not found or not valid */
/* If we are standalone server we don't have a router, we just create
- the channel by ourselves. */
+ the channel by ourselves (unless it existed). */
if (server->standalone) {
- channel = silc_server_create_new_channel(server, server->id, cipher,
- hmac, channel_name, TRUE);
if (!channel) {
- silc_server_command_send_status_reply(
- cmd, SILC_COMMAND_JOIN,
- SILC_STATUS_ERR_UNKNOWN_ALGORITHM,
- 0);
- silc_free(client_id);
- goto out;
- }
-
- umode = (SILC_CHANNEL_UMODE_CHANOP | SILC_CHANNEL_UMODE_CHANFO);
- created = TRUE;
- create_key = FALSE;
+ channel = silc_server_create_new_channel(server, server->id, cipher,
+ hmac, channel_name, TRUE);
+ if (!channel) {
+ silc_server_command_send_status_reply(
+ cmd, SILC_COMMAND_JOIN,
+ SILC_STATUS_ERR_UNKNOWN_ALGORITHM,
+ 0);
+ silc_free(client_id);
+ goto out;
+ }
+ umode = (SILC_CHANNEL_UMODE_CHANOP | SILC_CHANNEL_UMODE_CHANFO);
+ created = TRUE;
+ create_key = FALSE;
+ }
} else {
/* The channel does not exist on our server. If we are normal server
if (!sconn->backup) {
/* Mark this router our primary router if we're still standalone */
if (server->standalone) {
+ SILC_LOG_DEBUG(("This connection is our primary router"));
server->id_entry->router = id_entry;
server->router = id_entry;
server->standalone = FALSE;
client = (SilcClientEntry)id_cache->context;
/* If client is not registered, is not originated from `router'
- or is not owned by `entry', skip it. */
+ and is not owned by `entry', skip it. */
if (!(client->data.status & SILC_IDLIST_STATUS_REGISTERED) ||
client->router != router ||
(router != entry && !SILC_ID_COMPARE(client->id, entry->id,
client = (SilcClientEntry)id_cache->context;
/* If client is not registered, is not originated from `router'
- or is not owned by `entry', skip it. */
+ and is not owned by `entry', skip it. */
if (!(client->data.status & SILC_IDLIST_STATUS_REGISTERED) ||
client->router != router ||
(router != entry && !SILC_ID_COMPARE(client->id, entry->id,