dyn_gw: show Git SHA and no version in plugin constructor
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 13 Apr 2016 13:48:35 +0000 (15:48 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 13 Apr 2016 15:02:00 +0000 (17:02 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/dyn_gw/src/olsrd_plugin.c

index 8eff055..dab098a 100644 (file)
 
 #include "olsrd_plugin.h"
 #include "olsrd_dyn_gw.h"
+#include "olsr.h"
+#include "builddata.h"
 #include <stdio.h>
 
-#define PLUGIN_NAME    "OLSRD dynamic gateway plugin"
-#define PLUGIN_VERSION "0.4"
-#define MOD_DESC PLUGIN_NAME " " PLUGIN_VERSION
+#define PLUGIN_NAME              "OLSRD dyn_gw plugin"
 #define PLUGIN_INTERFACE_VERSION 5
 
 /**
@@ -72,7 +72,7 @@ void
 my_init(void)
 {
   /* Print plugin info to stdout */
-  printf("%s\n", MOD_DESC);
+  olsr_printf(0, "%s (%s)\n", PLUGIN_NAME, git_descriptor);
 }
 
 /*