1
0
mirror of https://github.com/fwbuilder/fwbuilder synced 2026-03-23 19:57:21 +01:00

* CustomServiceDialog.cpp (CustomServiceDialog::loadFWObject):

fixed bug #2870562: "custom service - protocol name
options". Added protocol "ipv6-icmp" to the list of predefined
protocols in the CustomService object and fixed the dialog to make
it properly save protocol name entered by the user (the widget
where user choses protocol name also supports editing so the user
can enter any protocol name not offered in the list of standard
protocols).
This commit is contained in:
Vadim Kurland 2009-10-13 20:01:33 +00:00
parent 2527d93b98
commit f065f708d1
3 changed files with 12 additions and 7 deletions

View File

@ -1 +1 @@
#define BUILD_NUM 1589
#define BUILD_NUM 1590

View File

@ -1,5 +1,14 @@
2009-10-13 vadim <vadim@vk.crocodile.org>
* CustomServiceDialog.cpp (CustomServiceDialog::loadFWObject):
fixed bug #2870562: "custom service - protocol name
options". Added protocol "ipv6-icmp" to the list of predefined
protocols in the CustomService object and fixed the dialog to make
it properly save protocol name entered by the user (the widget
where user choses protocol name also supports editing so the user
can enter any protocol name not offered in the list of standard
protocols).
* FWWindow.cpp (FWWindow::toolsDiscoveryDruid): fixed bug
#2867550: "Discovery Druid dieswhen there is no active'project
window".

View File

@ -117,6 +117,7 @@ void CustomServiceDialog::loadFWObject(FWObject *o)
m_dialog->protocol->addItem("tcp");
m_dialog->protocol->addItem("udp");
m_dialog->protocol->addItem("icmp");
m_dialog->protocol->addItem("ipv6-icmp");
bool standard_protocol = false;
int proto_index = 0;
@ -219,12 +220,7 @@ void CustomServiceDialog::applyChanges()
s->setCodeForPlatform( platform.toUtf8().constData(),
string(code.toUtf8().constData()));
}
int protocol_index = m_dialog->protocol->currentIndex();
QString protocol;
if (protocol_index >= 0)
protocol = m_dialog->protocol->itemText(protocol_index).toUtf8().constData();
else
protocol = m_dialog->protocol->lineEdit()->text();
QString protocol = m_dialog->protocol->lineEdit()->text();
s->setProtocol(string(protocol.toUtf8().constData()));
int af = (m_dialog->ipv6->isChecked()) ? AF_INET6 : AF_INET;
s->setAddressFamily(af);