1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-05-11 03:24:57 +02:00
* TCPServiceDialog.cpp (TCPServiceDialog::applyChanges): fixed bug
#1076: "when the start of a port range is greater than the end,
the GUI goes into a loop showing error dialogs". Ths problem
affected TCP and UDP service objects


fixes #1076
This commit is contained in:
Vadim Kurland
2010-01-13 01:27:59 +00:00
parent efcc7ee6e0
commit f3bb075d45
4 changed files with 12 additions and 35 deletions

View File

@@ -1 +1 @@
#define BUILD_NUM 2339
#define BUILD_NUM 2340

View File

@@ -1,3 +1,10 @@
2010-01-12 vadim <vadim@vk.crocodile.org>
* TCPServiceDialog.cpp (TCPServiceDialog::applyChanges): fixed bug
#1076: "when the start of a port range is greater than the end,
the GUI goes into a loop showing error dialogs". Ths problem
affected TCP and UDP service objects
2010-01-10 vadim <vadim@vk.crocodile.org>
* TableFactory.cpp (TableFactory::PrintTables): suppress comment

View File

@@ -198,27 +198,12 @@ void TCPServiceDialog::applyChanges()
int dps = m_dialog->ds->value();
int dpe = m_dialog->de->value();
if (sps!=0 && spe==0) m_dialog->se->setValue( m_dialog->ss->value() );
if (dps!=0 && dpe==0) m_dialog->de->setValue( m_dialog->ds->value() );
if (sps > spe) m_dialog->se->setValue( m_dialog->ss->value() );
if (dps > dpe) m_dialog->de->setValue( m_dialog->ds->value() );
spe = m_dialog->se->value();
dpe = m_dialog->de->value();
if (sps > spe)
{
QMessageBox::warning(this, "Firewall Builder",
QObject::tr("Invalid range defined for the source port."),
QObject::tr("&Continue editing"), NULL, NULL, 0, 2 );
return;
}
if (dps > dpe)
{
QMessageBox::warning(this, "Firewall Builder",
QObject::tr("Invalid range defined for the destination port."),
QObject::tr("&Continue editing"), NULL, NULL, 0, 2 );
return;
}
TCPUDPService::cast(new_state)->setSrcRangeStart(m_dialog->ss->value());
TCPUDPService::cast(new_state)->setSrcRangeEnd(m_dialog->se->value());
TCPUDPService::cast(new_state)->setDstRangeStart(m_dialog->ds->value());

View File

@@ -134,27 +134,12 @@ void UDPServiceDialog::applyChanges()
int dps = m_dialog->ds->value();
int dpe = m_dialog->de->value();
if (sps!=0 && spe==0) m_dialog->se->setValue( m_dialog->ss->value() );
if (dps!=0 && dpe==0) m_dialog->de->setValue( m_dialog->ds->value() );
if (sps > spe) m_dialog->se->setValue( m_dialog->ss->value() );
if (dps > dpe) m_dialog->de->setValue( m_dialog->ds->value() );
spe = m_dialog->se->value();
dpe = m_dialog->de->value();
if (sps > spe)
{
QMessageBox::warning(this, "Firewall Builder",
QObject::tr("Invalid range defined for the source port."),
QObject::tr("&Continue editing"), NULL, NULL, 0, 2 );
return;
}
if (dps > dpe)
{
QMessageBox::warning(this, "Firewall Builder",
QObject::tr("Invalid range defined for the destination port."),
QObject::tr("&Continue editing"), NULL, NULL, 0, 2 );
return;
}
TCPUDPService::cast(new_state)->setSrcRangeStart(m_dialog->ss->value());
TCPUDPService::cast(new_state)->setSrcRangeEnd(m_dialog->se->value());
TCPUDPService::cast(new_state)->setDstRangeStart(m_dialog->ds->value());