uint32 res_argc;
} *SilcServerResolveContext;
-static char
+static bool
silc_server_command_whois_check(SilcServerCommandContext cmd,
SilcClientEntry *clients,
uint32 clients_count)
SilcServerResolveContext resolve = NULL, r = NULL;
uint32 resolve_count = 0;
int i, k;
+ bool no_res = TRUE;
for (i = 0; i < clients_count; i++) {
entry = clients[i];
silc_server_command_destructor,
silc_server_command_whois,
silc_server_command_dup(cmd));
+ no_res = FALSE;
} else {
if (entry->data.status & SILC_IDLIST_STATUS_RESOLVING) {
/* We've resolved this and it still is not ready. We'll return
r->ident);
silc_server_packet_send(server, r->router->connection,
SILC_PACKET_COMMAND, cmd->packet->flags,
- res_cmd->data, res_cmd->len, TRUE);
+ res_cmd->data, res_cmd->len, FALSE);
/* Reprocess this packet after received reply */
silc_server_command_pending(server, SILC_COMMAND_WHOIS,
silc_free(r->res_argv);
silc_free(r->res_argv_lens);
silc_free(r->res_argv_types);
+ no_res = FALSE;
}
silc_free(resolve);
- if (resolve_count)
- return FALSE;
-
- return TRUE;
+ return no_res;
}
static void
then send WHOIS request to the server who owns the client. We use
WHOIS because we want to get as much information as possible at once. */
-static char
+static bool
silc_server_command_identify_check_client(SilcServerCommandContext cmd,
SilcClientEntry *clients,
uint32 clients_count)
SilcServerResolveContext resolve = NULL, r = NULL;
uint32 resolve_count = 0;
int i, k;
+ bool no_res = TRUE;
for (i = 0; i < clients_count; i++) {
entry = clients[i];
silc_server_command_destructor,
silc_server_command_identify,
silc_server_command_dup(cmd));
+ no_res = FALSE;
} else {
if (entry->data.status & SILC_IDLIST_STATUS_RESOLVING) {
/* We've resolved this and it still is not ready. We'll return
r->ident);
silc_server_packet_send(server, r->router->connection,
SILC_PACKET_COMMAND, cmd->packet->flags,
- res_cmd->data, res_cmd->len, TRUE);
+ res_cmd->data, res_cmd->len, FALSE);
/* Reprocess this packet after received reply */
silc_server_command_pending(server, SILC_COMMAND_WHOIS,
silc_free(r->res_argv);
silc_free(r->res_argv_lens);
silc_free(r->res_argv_types);
+ no_res = FALSE;
}
silc_free(resolve);
- if (resolve_count)
- return FALSE;
-
- return TRUE;
+ return no_res;
}
static void
/* Delete old cipher and allocate default one */
silc_cipher_free(channel->channel_key);
- if (!silc_cipher_alloc(cipher ? cipher : "aes-256-cbc",
+ if (!silc_cipher_alloc(cipher ? cipher : SILC_DEFAULT_CIPHER,
&channel->channel_key)) {
silc_server_command_send_status_reply(cmd, SILC_COMMAND_CMODE,
SILC_STATUS_ERR_UNKNOWN_ALGORITHM);
/* Delete old hmac and allocate default one */
silc_hmac_free(channel->hmac);
- if (!silc_hmac_alloc(hmac ? hmac : "hmac-sha1-96", NULL,
+ if (!silc_hmac_alloc(hmac ? hmac : SILC_DEFAULT_HMAC, NULL,
&channel->hmac)) {
silc_server_command_send_status_reply(cmd, SILC_COMMAND_CMODE,
SILC_STATUS_ERR_UNKNOWN_ALGORITHM);