summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Collins <daniel.collins@smoothwall.net>2022-01-06 00:20:05 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2022-01-06 00:23:53 +0000
commit80a6c16dcccdc105ecbdb67b78d28f56d572f948 (patch)
treeb278146df87128cd7d17207faa7f0299c6c62def
parent553c4c99cca173e9964d0edbd0676ed96c30f62b (diff)
downloaddnsmasq-80a6c16dcccdc105ecbdb67b78d28f56d572f948.tar.gz
Implements a SetLocaliseQueriesOption D-Bus method.
For setting the state of the -y/--localise-queries option.
-rw-r--r--dbus/DBus-interface4
-rw-r--r--src/dbus.c7
2 files changed, 11 insertions, 0 deletions
diff --git a/dbus/DBus-interface b/dbus/DBus-interface
index 954c5b9..df41d79 100644
--- a/dbus/DBus-interface
+++ b/dbus/DBus-interface
@@ -48,6 +48,10 @@ SetBogusPrivOption
------------------
Takes boolean, sets or resets the --bogus-priv option.
+SetLocaliseQueriesOption
+------------------------
+Takes boolean, sets or resets the --localise-queries option.
+
SetServers
----------
Returns nothing. Takes a set of arguments representing the new
diff --git a/src/dbus.c b/src/dbus.c
index d746b9a..4eae789 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -52,6 +52,9 @@ const char* introspection_xml_template =
" <method name=\"SetFilterWin2KOption\">\n"
" <arg name=\"filterwin2k\" direction=\"in\" type=\"b\"/>\n"
" </method>\n"
+" <method name=\"SetLocaliseQueriesOption\">\n"
+" <arg name=\"localise-queries\" direction=\"in\" type=\"b\"/>\n"
+" </method>\n"
" <method name=\"SetBogusPrivOption\">\n"
" <arg name=\"boguspriv\" direction=\"in\" type=\"b\"/>\n"
" </method>\n"
@@ -694,6 +697,10 @@ DBusHandlerResult message_handler(DBusConnection *connection,
{
reply = dbus_set_bool(message, OPT_FILTER, "filterwin2k");
}
+ else if (strcmp(method, "SetLocaliseQueriesOption") == 0)
+ {
+ reply = dbus_set_bool(message, OPT_LOCALISE, "localise-queries");
+ }
else if (strcmp(method, "SetBogusPrivOption") == 0)
{
reply = dbus_set_bool(message, OPT_BOGUSPRIV, "bogus-priv");