SILC_LOG_DEBUG(("Forwarding the query to router for processing"));
+ /* Statistics */
+ server->stat.commands_sent++;
+
/* Send WHOIS command to our router */
old_ident = silc_command_get_ident(query->cmd->payload);
silc_command_set_ident(query->cmd->payload, ++server->cmd_ident);
SILC_LOG_DEBUG(("Sending error to original query"));
+ /* Statistics */
+ server->stat.commands_sent++;
+
/* Send the same command reply payload which contains the error */
silc_command_set_command(cmdr->payload, query->querycmd);
silc_command_set_ident(cmdr->payload,
}
/* Check nickname */
- tmp = silc_identifier_check(query->nickname, strlen(query->nickname),
- SILC_STRING_UTF8, 128, &tmp_len);
- if (!tmp) {
- silc_server_query_send_error(server, query,
- SILC_STATUS_ERR_BAD_NICKNAME, 0);
- silc_server_query_free(query);
- return;
+ if (tmp) {
+ tmp = silc_identifier_check(query->nickname, strlen(query->nickname),
+ SILC_STRING_UTF8, 128, &tmp_len);
+ if (!tmp) {
+ silc_server_query_send_error(server, query,
+ SILC_STATUS_ERR_BAD_NICKNAME, 0);
+ silc_server_query_free(query);
+ return;
+ }
+ silc_free(query->nickname);
+ query->nickname = tmp;
}
- silc_free(query->nickname);
- query->nickname = tmp;
} else {
/* Parse the IDs included in the query */
r->argc++;
}
+ /* Statistics */
+ server->stat.commands_sent++;
+
/* Send WHOIS command */
res_cmd = silc_command_payload_encode(SILC_COMMAND_WHOIS,
r->argc, r->arg, r->arg_lens,
always_resolve) {
SilcBuffer buffer, idp;
+ /* Statistics */
+ server->stat.commands_sent++;
+
if (client) {
client->data.status |= SILC_IDLIST_STATUS_RESOLVING;
client->data.status &= ~SILC_IDLIST_STATUS_RESOLVED;