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:
parent
6445c1cf0b
commit
6f39a80ec6
3 changed files with 7 additions and 7 deletions
|
@ -27,17 +27,17 @@ static void handle_reload(int parc, char *parv[]);
|
||||||
static void handle_stat(int parc, char *parv[]);
|
static void handle_stat(int parc, char *parv[]);
|
||||||
|
|
||||||
rb_helper *authd_helper = NULL;
|
rb_helper *authd_helper = NULL;
|
||||||
authd_cmd_handler authd_cmd_handlers[255] = {
|
authd_cmd_handler authd_cmd_handlers[256] = {
|
||||||
['C'] = handle_reload,
|
['C'] = handle_reload,
|
||||||
['D'] = resolve_dns,
|
['D'] = resolve_dns,
|
||||||
['S'] = handle_stat,
|
['S'] = handle_stat,
|
||||||
};
|
};
|
||||||
|
|
||||||
authd_stat_handler authd_stat_handlers[255] = {
|
authd_stat_handler authd_stat_handlers[256] = {
|
||||||
['D'] = enumerate_nameservers,
|
['D'] = enumerate_nameservers,
|
||||||
};
|
};
|
||||||
|
|
||||||
authd_reload_handler authd_reload_handlers[255] = {
|
authd_reload_handler authd_reload_handlers[256] = {
|
||||||
['D'] = reload_nameservers,
|
['D'] = reload_nameservers,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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_stat_handler)(const char *rid, const char letter);
|
||||||
typedef void (*authd_reload_handler)(const char letter);
|
typedef void (*authd_reload_handler)(const char letter);
|
||||||
|
|
||||||
extern authd_cmd_handler authd_cmd_handlers[255];
|
extern authd_cmd_handler authd_cmd_handlers[256];
|
||||||
extern authd_stat_handler authd_stat_handlers[255];
|
extern authd_stat_handler authd_stat_handlers[256];
|
||||||
extern authd_reload_handler authd_reload_handlers[255];
|
extern authd_reload_handler authd_reload_handlers[256];
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -133,7 +133,7 @@ static void stats_capability(struct Client *);
|
||||||
* C initalisers so we don't have to iterate anymore.
|
* C initalisers so we don't have to iterate anymore.
|
||||||
* --Elizafox
|
* --Elizafox
|
||||||
*/
|
*/
|
||||||
static struct stats_cmd stats_cmd_table[255] = {
|
static struct stats_cmd stats_cmd_table[256] = {
|
||||||
/* letter function need_oper need_admin */
|
/* letter function need_oper need_admin */
|
||||||
['a'] = { stats_dns_servers, 1, 1, },
|
['a'] = { stats_dns_servers, 1, 1, },
|
||||||
['A'] = { stats_dns_servers, 1, 1, },
|
['A'] = { stats_dns_servers, 1, 1, },
|
||||||
|
|
Loading…
Reference in a new issue