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

index 67feede..835c524 100644 (file)
 
 #include "olsrd_plugin.h"
 #include "olsrd_secure.h"
+#include "olsr.h"
+#include "builddata.h"
+
 #include <stdio.h>
 #include <string.h>
 
-#define PLUGIN_NAME    "OLSRD signature plugin"
-#define PLUGIN_VERSION "0.5"
-#define MOD_DESC PLUGIN_NAME " " PLUGIN_VERSION
+#define PLUGIN_NAME              "OLSRD secure plugin"
 #define PLUGIN_INTERFACE_VERSION 5
 
 static void my_init(void) __attribute__ ((constructor));
@@ -66,9 +67,9 @@ static void
 my_init(void)
 {
   /* Print plugin info to stdout */
-  /* We cannot use olsr_printf yet! */
-  printf("%s\n", MOD_DESC);
-  printf("[ENC]Accepted parameter pairs: (\"Keyfile\" <FILENAME>)\n");
+  olsr_printf(0, "%s (%s)\n", PLUGIN_NAME, git_descriptor);
+
+  olsr_printf(0, "[ENC]Accepted parameter pairs: (\"Keyfile\" <FILENAME>)\n");
 }
 
 /**