hlr: Export + Declare global g_hlr symbol

Change-Id: I6f3e50f071fb2fbbe58413b4760dc2215055a444
diff --git a/src/hlr.c b/src/hlr.c
index 8732587..0b1ff4f 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -43,7 +43,7 @@
 #include "luop.h"
 #include "hlr_vty.h"
 
-static struct hlr *g_hlr;
+struct hlr *g_hlr;
 static int quit = 0;
 
 /* Trigger 'Insert Subscriber Data' messages to all connected GSUP clients.
diff --git a/src/hlr.h b/src/hlr.h
index 368a052..8f73806 100644
--- a/src/hlr.h
+++ b/src/hlr.h
@@ -39,6 +39,8 @@
 	char *gsup_bind_addr;
 };
 
+extern struct hlr *g_hlr;
+
 struct hlr_subscriber;
 
 void osmo_hlr_subscriber_update_notify(struct hlr_subscriber *subscr);
diff --git a/src/hlr_vty.c b/src/hlr_vty.c
index ecc2f5c..7c20a0b 100644
--- a/src/hlr_vty.c
+++ b/src/hlr_vty.c
@@ -32,8 +32,6 @@
 #include "hlr_vty_subscr.h"
 #include "gsup_server.h"
 
-static struct hlr *g_hlr = NULL;
-
 struct cmd_node hlr_node = {
 	HLR_NODE,
 	"%s(config-hlr)# ",
@@ -154,8 +152,6 @@
 
 void hlr_vty_init(struct hlr *hlr, const struct log_info *cat)
 {
-	g_hlr = hlr;
-
 	logging_vty_add_cmds(cat);
 	osmo_talloc_vty_add_cmds();
 
diff --git a/src/hlr_vty_subscr.c b/src/hlr_vty_subscr.c
index 4092a8f..bbda6c5 100644
--- a/src/hlr_vty_subscr.c
+++ b/src/hlr_vty_subscr.c
@@ -33,8 +33,6 @@
 
 #define hexdump_buf(buf) osmo_hexdump_nospc((void*)buf, sizeof(buf))
 
-static struct hlr *g_hlr = NULL;
-
 static void subscr_dump_full_vty(struct vty *vty, struct hlr_subscriber *subscr)
 {
 	int rc;
@@ -478,8 +476,6 @@
 
 void hlr_vty_subscriber_init(struct hlr *hlr)
 {
-	g_hlr = hlr;
-
 	install_element_ve(&subscriber_show_cmd);
 	install_element(ENABLE_NODE, &subscriber_create_cmd);
 	install_element(ENABLE_NODE, &subscriber_delete_cmd);