silc_dlist_start(server->pending_commands);
while ((r = silc_dlist_get(server->pending_commands)) != SILC_LIST_END) {
- if (r->reply_cmd == reply_cmd && r->ident == ident) {
+ if ((r->reply_cmd == reply_cmd || (r->reply_cmd == SILC_COMMAND_NONE &&
+ r->reply_check))
+ && r->ident == ident) {
silc_dlist_del(server->pending_commands, r);
- break;
+ silc_free(r);
}
}
}
callbacks = silc_realloc(callbacks, sizeof(*callbacks) * (i + 1));
callbacks[i].context = r->context;
callbacks[i].callback = r->callback;
+ r->reply_check = TRUE;
ctx->ident = ident;
i++;
}
break;
}
+ silc_id_payload_free(idp);
silc_free(id);
}
}
silc_server_command_send_status_reply(cmd, SILC_COMMAND_CMODE,
SILC_STATUS_ERR_AUTH_FAILED,
0);
+ silc_pkcs_public_key_free(channel->founder_key);
+ channel->founder_key = NULL;
goto out;
}
}
client->mode |= SILC_UMODE_SERVER_OPERATOR;
/* Update statistics */
- if (client->connection)
+ if (SILC_IS_LOCAL(client))
server->stat.my_server_ops++;
if (server->server_type == SILC_ROUTER)
server->stat.server_ops++;
/* Remove operator privileges, since the client may resume in some
other server which to it does not have operator privileges. */
- client->mode &= ~(SILC_UMODE_SERVER_OPERATOR |
- SILC_UMODE_ROUTER_OPERATOR);
+ SILC_OPER_STATS_UPDATE(client, server, SILC_UMODE_SERVER_OPERATOR);
+ SILC_OPER_STATS_UPDATE(client, router, SILC_UMODE_ROUTER_OPERATOR);
/* Send the user mode notify to notify that client is detached */
client->mode |= SILC_UMODE_DETACHED;
client->mode |= SILC_UMODE_ROUTER_OPERATOR;
/* Update statistics */
- if (client->connection)
+ if (SILC_IS_LOCAL(client))
server->stat.my_router_ops++;
if (server->server_type == SILC_ROUTER)
server->stat.router_ops++;