while ((r = silc_dlist_get(server->pending_commands)) != SILC_LIST_END) {
if (r->reply_cmd == reply_cmd && r->ident == ident) {
silc_dlist_del(server->pending_commands, r);
+ silc_free(r);
break;
}
}
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++;