Cleaned up xmlrpc-c string sanitization.

This commit is contained in:
Jari Sundell
2025-11-16 18:48:32 +01:00
committed by GitHub
parent 3a1da2fe34
commit 900be334dc
15 changed files with 117 additions and 280 deletions
+4 -4
View File
@@ -116,7 +116,7 @@ DownloadList::activate_display(Display displayType) {
m_uiArray[m_state] = NULL;
break;
case DISPLAY_DOWNLOAD_LIST:
m_uiArray[DISPLAY_DOWNLOAD_LIST]->disable();
@@ -130,7 +130,7 @@ DownloadList::activate_display(Display displayType) {
case DISPLAY_STRING_LIST:
m_uiArray[m_state]->disable();
break;
default:
break;
}
@@ -152,7 +152,7 @@ DownloadList::activate_display(Display displayType) {
download->activate(m_frame);
download->slot_exit(std::bind(&DownloadList::activate_display, this, DISPLAY_DOWNLOAD_LIST));
m_uiArray[DISPLAY_DOWNLOAD] = download;
break;
}
@@ -273,7 +273,7 @@ DownloadList::receive_exit_input(Input type) {
set_escdelay(1000);
input::TextInput* input = control->ui()->current_input();
// We should check that this object is the one holding the input.
if (input == NULL)
return;
-34
View File
@@ -1,37 +1,3 @@
// rTorrent - BitTorrent client
// Copyright (C) 2005-2011, Jari Sundell
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// In addition, as a special exception, the copyright holders give
// permission to link the code of portions of this program with the
// OpenSSL library under certain conditions as described in each
// individual source file, and distribute linked combinations
// including the two.
//
// You must obey the GNU General Public License in all respects for
// all of the code used other than OpenSSL. If you modify file(s)
// with this exception, you may extend this exception to your version
// of the file(s), but you are not obligated to do so. If you do not
// wish to do so, delete this exception statement from your version.
// If you delete this exception statement from all source files in the
// program, then also delete it here.
//
// Contact: Jari Sundell <sundell.software@gmail.com>
#ifndef RTORRENT_UI_DOWNLOAD_LIST_H
#define RTORRENT_UI_DOWNLOAD_LIST_H
+15 -8
View File
@@ -83,13 +83,13 @@ Root::init(Control* c) {
m_downloadList = std::make_unique<DownloadList>();
display::Frame* rootFrame = m_control->display()->root_frame();
auto root_frame = m_control->display()->root_frame();
rootFrame->initialize_row(5);
rootFrame->frame(0)->initialize_window(m_windowTitle.get());
rootFrame->frame(2)->initialize_window(m_windowHttpQueue.get());
rootFrame->frame(3)->initialize_window(m_windowInput.get());
rootFrame->frame(4)->initialize_window(m_windowStatusbar.get());
root_frame->initialize_row(5);
root_frame->frame(0)->initialize_window(m_windowTitle.get());
root_frame->frame(2)->initialize_window(m_windowHttpQueue.get());
root_frame->frame(3)->initialize_window(m_windowInput.get());
root_frame->frame(4)->initialize_window(m_windowStatusbar.get());
m_windowTitle->set_active(true);
m_windowStatusbar->set_active(true);
@@ -97,7 +97,7 @@ Root::init(Control* c) {
setup_keys();
m_downloadList->activate(rootFrame->frame(1));
m_downloadList->activate(root_frame->frame(1));
}
void
@@ -111,7 +111,14 @@ Root::cleanup() {
m_control->display()->root_frame()->clear();
m_control->input()->erase(&m_bindings);
m_control = NULL;
// Destroy windows in reverse order of creation.
m_windowStatusbar = nullptr;
m_windowInput = nullptr;
m_windowHttpQueue = nullptr;
m_windowTitle = nullptr;
m_downloadList = nullptr;
m_control = nullptr;
}
const char*