From be40aa0b1a8f538a60549f4bdb69ec0f58f304ca Mon Sep 17 00:00:00 2001 From: kremlin Date: Thu, 26 Jun 2014 01:08:06 -0500 Subject: [PATCH] drop persistent file handlers, use rc.d 'reload' instead --- src/config.h | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/src/config.h b/src/config.h index d40b761..a209a1c 100644 --- a/src/config.h +++ b/src/config.h @@ -1,35 +1,22 @@ -/* manually increment this if adding new functionality/config files */ -static const guint XML_FILE_COUNT = 8; - - -/* our buffers for xml config file descriptors */ -static int hostnamed_ispect_xml_descr, hostnamed_dbus_xml_descr, - localed_ispect_xml_descr, localed_dbus_xml_descr, - timedated_ispect_xml_descr, timedated_dbus_xml_descr, - logind_ispect_xml_descr, logind_dbus_xml_descr; - -static int *xml_descriptors[] = { - - &hostnamed_ispect_xml_descr, &hostnamed_dbus_xml_descr, - &localed_ispect_xml_descr, &localed_dbus_xml_descr, - &timedated_ispect_xml_descr, &timedated_dbus_xml_descr, - &logind_ispect_xml_descr, &logind_dbus_xml_descr -}; - /*our buffers for xml config file contents */ static gchar **hostnamed_ispect_xml, **hostnamed_dbus_xml, - **localed_ispect_xml, **localed_dbus_xml, - **timedated_ispect_xml, **timedated_dbus_xml, - **logind_ispect_xml, **logind_dbus_xml; + **localed_ispect_xml, **localed_dbus_xml, + **timedated_ispect_xml, **timedated_dbus_xml, + **logind_ispect_xml, **logind_dbus_xml; -static gchar ***xml_contents[] = { +/* manually increment this if adding new functionality/config files */ +static const guint XML_FILE_COUNT = 8; - &hostnamed_ispect_xml, &hostnamed_dbus_xml, - &localed_ispect_xml, &localed_dbus_xml, - &timedated_ispect_xml, &timedated_dbus_xml, - &logind_ispect_xml, &logind_dbus_xml +static gchar **xml_contents[] = { + hostnamed_ispect_xml, hostnamed_dbus_xml, + localed_ispect_xml, localed_dbus_xml, + timedated_ispect_xml, timedated_dbus_xml, + logind_ispect_xml, logind_dbus_xml }; +/* TODO ifdef allowed editable xml only take files that meet exact sizes + * of ones hashed below */ + #ifndef ALLOW_EDITED_XML static const gchar *hostnamed_dbus_sum = "ad7536541463e426388c7562b0e7a693c3b646539b3ae163a7caf6ad95f10e08"; @@ -43,10 +30,6 @@ static const gchar *timedated_ispect_sum = "f576cb908636a285c9cd2e42a71ad243a0d5 #endif -static gboolean set_xml_descriptors() { - -} - static gboolean populate_xml_data_dir() { } -- 2.41.0