diff options
-rw-r--r-- | CHANGELOG.rst | 5 | ||||
-rw-r--r-- | CMakeLists.txt | 6 | ||||
-rw-r--r-- | doc/biboumi.1.rst | 8 | ||||
-rw-r--r-- | packaging/biboumi.spec.cmake | 3 | ||||
-rw-r--r-- | src/main.cpp | 2 | ||||
-rw-r--r-- | src/xmpp/biboumi_adhoc_commands.cpp | 3 | ||||
-rw-r--r-- | tests/end_to_end/__main__.py | 3 |
7 files changed, 22 insertions, 8 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1385f40..4cba737 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,8 @@ +Version 9.0 +=========== + +- SIGHUP is now caught and reloads the configuration like SIGUSR1 and 2. + Version 8.1 - 2018-05-14 ======================== diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d59aa7..1d57a0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 3.0) project(biboumi) -set(${PROJECT_NAME}_VERSION_MAJOR 8) -set(${PROJECT_NAME}_VERSION_MINOR 1) -set(${PROJECT_NAME}_VERSION_SUFFIX "") +set(${PROJECT_NAME}_VERSION_MAJOR 9) +set(${PROJECT_NAME}_VERSION_MINOR 0) +set(${PROJECT_NAME}_VERSION_SUFFIX "~dev") if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) diff --git a/doc/biboumi.1.rst b/doc/biboumi.1.rst index 03e8a36..5d6facc 100644 --- a/doc/biboumi.1.rst +++ b/doc/biboumi.1.rst @@ -42,10 +42,10 @@ variables, with the name all in upper case and prefixed with "BIBOUMI_". For example, if the environment contains “BIBOUMI_PASSWORD=blah", this will override the value of the “password” option in the configuration file. -Sending SIGUSR1 or SIGUSR2 (see kill(1)) to the process will force it to -re-read the configuration and make it close and re-open the log files. You -can use this to change any configuration option at runtime, or do a log -rotation. +Sending SIGUSR1, SIGUSR2 or SIGHUP (see kill(1)) to the process will force +it to re-read the configuration and make it close and re-open the log +files. You can use this to change any configuration option at runtime, or +do a log rotation. Here is a description of every possible option: diff --git a/packaging/biboumi.spec.cmake b/packaging/biboumi.spec.cmake index 119505c..5ef34b6 100644 --- a/packaging/biboumi.spec.cmake +++ b/packaging/biboumi.spec.cmake @@ -63,6 +63,9 @@ make check %{?_smp_mflags} %changelog +* ${RPM_DATE} Le Coz Florent <louiz@louiz.org> - ${RPM_VERSION}-1 +- Build latest git revision + * Wed May 14 2018 Le Coz Florent <louiz@louiz.org> - 8.1-1 Update to version 8.1 diff --git a/src/main.cpp b/src/main.cpp index 59fda4e..09adc5c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -103,6 +103,7 @@ int main(int ac, char** av) sigaddset(&mask, SIGTERM); sigaddset(&mask, SIGUSR1); sigaddset(&mask, SIGUSR2); + sigaddset(&mask, SIGHUP); sigprocmask(SIG_BLOCK, &mask, nullptr); // Install the signals used to exit the process cleanly, or reload the @@ -124,6 +125,7 @@ int main(int ac, char** av) on_sigusr.sa_flags = 0; sigaction(SIGUSR1, &on_sigusr, nullptr); sigaction(SIGUSR2, &on_sigusr, nullptr); + sigaction(SIGHUP, &on_sigusr, nullptr); auto p = std::make_shared<Poller>(); diff --git a/src/xmpp/biboumi_adhoc_commands.cpp b/src/xmpp/biboumi_adhoc_commands.cpp index b62dcfc..5a0aba8 100644 --- a/src/xmpp/biboumi_adhoc_commands.cpp +++ b/src/xmpp/biboumi_adhoc_commands.cpp @@ -116,6 +116,7 @@ void ConfigureGlobalStep1(XmppComponent&, AdhocSession& session, XmlNode& comman auto options = Database::get_global_options(owner.bare()); + command_node.delete_all_children(); XmlSubNode x(command_node, "jabber:x:data:x"); x["type"] = "form"; XmlSubNode title(x, "title"); @@ -223,6 +224,7 @@ void ConfigureIrcServerStep1(XmppComponent&, AdhocSession& session, XmlNode& com server_domain); auto commands = Database::get_after_connection_commands(options); + command_node.delete_all_children(); XmlSubNode x(command_node, "jabber:x:data:x"); x["type"] = "form"; XmlSubNode title(x, "title"); @@ -508,6 +510,7 @@ void insert_irc_channel_configuration_form(XmlNode& node, const Jid& requester, auto options = Database::get_irc_channel_options_with_server_default(requester.local + "@" + requester.domain, iid.get_server(), iid.get_local()); + node.delete_all_children(); XmlSubNode x(node, "jabber:x:data:x"); x["type"] = "form"; XmlSubNode title(x, "title"); diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index f8ef2d4..bef510c 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -2924,11 +2924,12 @@ if __name__ == '__main__': Scenario("irc_channel_configure", [ handshake_sequence(), - partial(send_stanza, "<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute' /></iq>"), + partial(send_stanza, "<iq type='set' id='id1' from='{jid_one}/{resource_one}' to='#foo%{irc_server_one}'><command xmlns='http://jabber.org/protocol/commands' node='configure' action='execute'><dummy/></command></iq>"), partial(expect_stanza, ("/iq[@type='result']/commands:command[@node='configure'][@sessionid][@status='executing']", "/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='encoding_in']", "/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='text-single'][@var='encoding_out']", "/iq/commands:command/dataform:x[@type='form']/dataform:field[@type='list-single'][@var='record_history']/dataform:value[text()='unset']", + "!/iq/commands:command/commands:dummy", ), after = partial(save_value, "sessionid", partial(extract_attribute, "/iq[@type='result']/commands:command[@node='configure']", "sessionid")) ), |