summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/plugin-api.txt2
-rw-r--r--include/plugin.h2
-rw-r--r--include/version.h.in2
-rw-r--r--src/plugin.c3
4 files changed, 6 insertions, 3 deletions
diff --git a/doc/plugin-api.txt b/doc/plugin-api.txt
index e329ced7..696e2c16 100644
--- a/doc/plugin-api.txt
+++ b/doc/plugin-api.txt
@@ -20,5 +20,5 @@ static void example_exit(void)
{
}
-CONNMAN_PLUGIN_DEFINE(example, "Example plugin", VERSION,
+CONNMAN_PLUGIN_DEFINE(example, "Example plugin", CONNMAN_VERSION,
example_init, example_exit)
diff --git a/include/plugin.h b/include/plugin.h
index d538dc7e..84e09586 100644
--- a/include/plugin.h
+++ b/include/plugin.h
@@ -69,7 +69,7 @@ struct connman_plugin_desc {
* {
* }
*
- * CONNMAN_PLUGIN_DEFINE(example, "Example plugin", VERSION,
+ * CONNMAN_PLUGIN_DEFINE(example, "Example plugin", CONNMAN_VERSION,
* example_init, example_exit)
* ]|
*/
diff --git a/include/version.h.in b/include/version.h.in
index c163f8ae..5d44396f 100644
--- a/include/version.h.in
+++ b/include/version.h.in
@@ -26,7 +26,7 @@
extern "C" {
#endif
-#define CONNMAN_VERSION @VERSION@
+#define CONNMAN_VERSION "@VERSION@"
#ifdef __cplusplus
}
diff --git a/src/plugin.c b/src/plugin.c
index 2103b66e..7fb7d444 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -43,6 +43,9 @@ static gboolean add_plugin(void *handle, struct connman_plugin_desc *desc)
if (desc->init == NULL)
return FALSE;
+ if (g_str_equal(desc->version, CONNMAN_VERSION) == FALSE)
+ return FALSE;
+
plugin = g_try_new0(struct connman_plugin, 1);
if (plugin == NULL)
return FALSE;