X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fcommand.c;h=82231d235d89b845833f7d30d1333a295d8a115b;hb=b380893d96cb8d673cdd57a2383195903078ce7d;hp=4e7a9c79e9989e4154cdd3e405ce1dd26be43dbf;hpb=c2b07fdc09d15d9eb661cbc8ae1bc4acd9cb4bcd;p=silc.git diff --git a/apps/silcd/command.c b/apps/silcd/command.c index 4e7a9c79..82231d23 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -1707,6 +1707,7 @@ static void silc_server_command_join_channel(SilcServer server, bool resolve; unsigned char *fkey = NULL; SilcUInt32 fkey_len = 0; + const char *cipher; SILC_LOG_DEBUG(("Joining client to channel")); @@ -1917,12 +1918,11 @@ static void silc_server_command_join_channel(SilcServer server, if (!(channel->mode & SILC_CHANNEL_MODE_PRIVKEY)) { tmp = silc_id_id2str(channel->id, SILC_ID_CHANNEL); + cipher = silc_cipher_get_name(channel->channel_key); keyp = silc_channel_key_payload_encode(silc_id_get_len(channel->id, SILC_ID_CHANNEL), tmp, - strlen(channel->channel_key-> - cipher->name), - channel->channel_key->cipher->name, + strlen(cipher), cipher, channel->key_len / 8, channel->key); silc_free(tmp); } @@ -2611,8 +2611,8 @@ SILC_SERVER_CMD_FUNC(cmode) silc_server_send_channel_key(server, NULL, channel, server->server_type == SILC_ROUTER ? FALSE : !server->standalone); - - cipher = channel->channel_key->cipher->name; + + cipher = (char *)silc_cipher_get_name(channel->channel_key); hmac = (char *)silc_hmac_get_name(channel->hmac); } }