0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-17 23:40:57 +01:00

authd, m_stats: fix command table sizes

There are 256 possible byte values.
This commit is contained in:
Mantas Mikulėnas 2016-03-09 18:15:42 +02:00
parent 6445c1cf0b
commit 6f39a80ec6
3 changed files with 7 additions and 7 deletions

View file

@ -27,17 +27,17 @@ static void handle_reload(int parc, char *parv[]);
static void handle_stat(int parc, char *parv[]);
rb_helper *authd_helper = NULL;
authd_cmd_handler authd_cmd_handlers[255] = {
authd_cmd_handler authd_cmd_handlers[256] = {
['C'] = handle_reload,
['D'] = resolve_dns,
['S'] = handle_stat,
};
authd_stat_handler authd_stat_handlers[255] = {
authd_stat_handler authd_stat_handlers[256] = {
['D'] = enumerate_nameservers,
};
authd_reload_handler authd_reload_handlers[255] = {
authd_reload_handler authd_reload_handlers[256] = {
['D'] = reload_nameservers,
};

View file

@ -33,8 +33,8 @@ typedef void (*authd_cmd_handler)(int parc, char *parv[]);
typedef void (*authd_stat_handler)(const char *rid, const char letter);
typedef void (*authd_reload_handler)(const char letter);
extern authd_cmd_handler authd_cmd_handlers[255];
extern authd_stat_handler authd_stat_handlers[255];
extern authd_reload_handler authd_reload_handlers[255];
extern authd_cmd_handler authd_cmd_handlers[256];
extern authd_stat_handler authd_stat_handlers[256];
extern authd_reload_handler authd_reload_handlers[256];
#endif

View file

@ -133,7 +133,7 @@ static void stats_capability(struct Client *);
* C initalisers so we don't have to iterate anymore.
* --Elizafox
*/
static struct stats_cmd stats_cmd_table[255] = {
static struct stats_cmd stats_cmd_table[256] = {
/* letter function need_oper need_admin */
['a'] = { stats_dns_servers, 1, 1, },
['A'] = { stats_dns_servers, 1, 1, },