Fix plugin interface on example debug and defer plugins.

This commit is contained in:
Roger Light
2020-09-30 09:43:53 +01:00
parent 67549f48ba
commit e8a641c759
2 changed files with 5 additions and 5 deletions

View File

@@ -45,7 +45,7 @@ void print_col(struct mosquitto *client)
int mosquitto_auth_plugin_version(void)
{
printf(ANSI_BLUE "PLUGIN ::: mosquitto_auth_plugin_version()" ANSI_RESET "\n");
return MOSQ_AUTH_PLUGIN_VERSION;
return 4;
}
int mosquitto_auth_plugin_init(void **user_data, struct mosquitto_opt *auth_opts, int auth_opt_count)

View File

@@ -24,7 +24,7 @@ Contributors:
int mosquitto_auth_plugin_version(void)
{
return MOSQ_AUTH_PLUGIN_VERSION;
return 4;
}
int mosquitto_auth_plugin_init(void **user_data, struct mosquitto_opt *auth_opts, int auth_opt_count)
@@ -47,18 +47,18 @@ int mosquitto_auth_security_cleanup(void *user_data, struct mosquitto_opt *auth_
return MOSQ_ERR_SUCCESS;
}
int mosquitto_auth_acl_check(void *user_data, int access, const struct mosquitto *client, struct mosquitto_acl_msg *msg)
int mosquitto_auth_acl_check(void *user_data, int access, struct mosquitto *client, const struct mosquitto_acl_msg *msg)
{
printf("mosquitto_acl_check(u:%s)\n", mosquitto_client_username(client));
return MOSQ_ERR_PLUGIN_DEFER;
}
int mosquitto_auth_unpwd_check(void *user_data, const struct mosquitto *client, const char *username, const char *password)
int mosquitto_auth_unpwd_check(void *user_data, struct mosquitto *client, const char *username, const char *password)
{
return MOSQ_ERR_PLUGIN_DEFER;
}
int mosquitto_auth_psk_key_get(void *user_data, const struct mosquitto *client, const char *hint, const char *identity, char *key, int max_key_len)
int mosquitto_auth_psk_key_get(void *user_data, struct mosquitto *client, const char *hint, const char *identity, char *key, int max_key_len)
{
return MOSQ_ERR_PLUGIN_DEFER;
}