Mark section_type_value as external (holds string names of the various sections)
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 8 Nov 2011 14:52:56 +0000 (15:52 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 8 Nov 2011 14:52:56 +0000 (15:52 +0100)
src/include/modules.h
src/main/modules.c

index 4e504be..6de7dc3 100644 (file)
@@ -35,6 +35,14 @@ typedef enum rlm_components {
   RLM_COMPONENT_COUNT          /* 8 / 10: How many components are there */
 } rlm_components_t;
 
+typedef struct section_type_value_t {
+        const char      *section;
+        const char      *typename;
+        int             attr;
+} section_type_value_t;
+
+extern const section_type_value_t section_type_value[];
+
 #define RLM_TYPE_THREAD_SAFE           (0 << 0)
 #define RLM_TYPE_THREAD_UNSAFE         (1 << 0)
 #define RLM_TYPE_CHECK_CONFIG_SAFE     (1 << 1)
index f01531b..8760fbd 100644 (file)
@@ -66,17 +66,10 @@ struct fr_module_hup_t {
        fr_module_hup_t         *next;
 };
 
-
-typedef struct section_type_value_t {
-       const char      *section;
-       const char      *typename;
-       int             attr;
-} section_type_value_t;
-
 /*
  *     Ordered by component
  */
-static const section_type_value_t section_type_value[RLM_COMPONENT_COUNT] = {
+const section_type_value_t section_type_value[RLM_COMPONENT_COUNT] = {
        { "authenticate", "Auth-Type",       PW_AUTH_TYPE },
        { "authorize",    "Autz-Type",       PW_AUTZ_TYPE },
        { "preacct",      "Pre-Acct-Type",   PW_PRE_ACCT_TYPE },