Skip to content

Commit

Permalink
Document what to do on non-matching plugin versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Oct 23, 2020
1 parent 42b9d94 commit 95e009c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions include/mosquitto_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ struct mosquitto_acl_msg {
* return the plugin interface version you support, i.e. 5.
*
* The supported_versions array tells you which plugin versions the broker supports.
*
* If the broker does not support the version that you require, return -1 to
* indicate failure.
*/
int mosquitto_plugin_version(int supported_version_count, const int *supported_versions);

Expand Down
4 changes: 2 additions & 2 deletions src/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ static int security__module_init_single(struct mosquitto__listener *listener, st
}
}else{
log__printf(NULL, MOSQ_LOG_ERR,
"Error: Incorrect auth plugin version (got %d, expected %d).",
version, MOSQ_AUTH_PLUGIN_VERSION);
"Error: Unsupported auth plugin version (got %d, expected %d).",
version, MOSQ_PLUGIN_VERSION);
LIB_ERROR();

LIB_CLOSE(lib);
Expand Down

0 comments on commit 95e009c

Please sign in to comment.