[pisa-src] r1344 - trunk/pisasd/sdconf.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Tue, 27 Oct 2009 16:36:54 +0100

Author: tjansen
Date: Tue Oct 27 16:36:54 2009
New Revision: 1344

Log:
Cosmetics: Moved sdconf_read_basic_confs() to the end of the file. Saves all
forward declarations.

Modified:
   trunk/pisasd/sdconf.c

Modified: trunk/pisasd/sdconf.c
==============================================================================
--- trunk/pisasd/sdconf.c       Tue Oct 27 16:28:42 2009        (r1343)
+++ trunk/pisasd/sdconf.c       Tue Oct 27 16:36:54 2009        (r1344)
@@ -28,17 +28,6 @@
 extern config_t cfg;   /* in libpisa/config.c */
 extern char authorized_cfg_file[MAX_PATH+1]; /* in libpisa/config.c */
 
-/* prototypes of static functions */
-static void sdconf_read_debuglevel(sd_conf *sdconf);
-static void sdconf_read_debugtypemask(sd_conf *sdconf);
-static void sdconf_read_ifname_eth(sd_conf *sdconf);
-static void sdconf_read_portnumber_control(sd_conf *sdconf);
-static void sdconf_read_portnumber_data(sd_conf *sdconf);
-static void sdconf_read_srv_ipv4(sd_conf *sdconf);
-static void sdconf_read_dyn_min(sd_conf *sdconf);
-static void sdconf_read_dyn_max(sd_conf *sdconf);
-static void sdconf_read_dyn_netmask(sd_conf *sdconf);
-
 /**
  * Initialize general configuration of server daemon.
  *
@@ -102,30 +91,6 @@
 }
 
 /**
- * Read basic settings from the configuration file
- */
-void sdconf_read_basic_confs(sd_conf *sdconf)
-{
-       /* Read several configuration from pisasd.conf. */
-       sdconf_read_debuglevel(sdconf);
-       sdconf_read_debugtypemask(sdconf);
-       sdconf_read_ifname_eth(sdconf);
-       sdconf_read_portnumber_control(sdconf);
-       sdconf_read_portnumber_data(sdconf);
-       sdconf_read_srv_ipv4(sdconf);
-       sdconf_read_dyn_min(sdconf);
-       sdconf_read_dyn_max(sdconf);
-       sdconf_read_dyn_netmask(sdconf);
-
-       sdconf_read_is_relay(sdconf);
-       /* NAT commands */
-       pisa_cfg_get_string_value("nat_up",sdconf->nat_up,NAT_STRING_MAX);
-       pisa_cfg_get_string_value("nat_down",sdconf->nat_down,NAT_STRING_MAX);
-       /* Read a list of allowed HITs from authorized_hosts.cfg. */
-       sdconf->hit_allowed = pisa_hitlist_build("allowed_hosts");
-}
-
-/**
  * Read the debug level from the configuration file.
  *
  * @param sdconf  sd_conf structure where conf settings are stored
@@ -343,3 +308,27 @@
                }
        }
 }
+
+/**
+ * Read basic settings from the configuration file
+ */
+void sdconf_read_basic_confs(sd_conf *sdconf)
+{
+       /* Read several configuration from pisasd.conf. */
+       sdconf_read_debuglevel(sdconf);
+       sdconf_read_debugtypemask(sdconf);
+       sdconf_read_ifname_eth(sdconf);
+       sdconf_read_portnumber_control(sdconf);
+       sdconf_read_portnumber_data(sdconf);
+       sdconf_read_srv_ipv4(sdconf);
+       sdconf_read_dyn_min(sdconf);
+       sdconf_read_dyn_max(sdconf);
+       sdconf_read_dyn_netmask(sdconf);
+
+       sdconf_read_is_relay(sdconf);
+       /* NAT commands */
+       pisa_cfg_get_string_value("nat_up",sdconf->nat_up,NAT_STRING_MAX);
+       pisa_cfg_get_string_value("nat_down",sdconf->nat_down,NAT_STRING_MAX);
+       /* Read a list of allowed HITs from authorized_hosts.cfg. */
+       sdconf->hit_allowed = pisa_hitlist_build("allowed_hosts");
+}

Other related posts:

  • » [pisa-src] r1344 - trunk/pisasd/sdconf.c - Thomas Jansen