summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kmyfirewall/genericinterface/kmfgenericinterfaceprotocol.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/kmyfirewall/genericinterface/kmfgenericinterfaceprotocol.cpp b/kmyfirewall/genericinterface/kmfgenericinterfaceprotocol.cpp
index 6916cfd..3f6a328 100644
--- a/kmyfirewall/genericinterface/kmfgenericinterfaceprotocol.cpp
+++ b/kmyfirewall/genericinterface/kmfgenericinterfaceprotocol.cpp
@@ -305,14 +305,15 @@ void KMFGenericInterfaceProtocol::slotProtocolClicked( KMFProtocolUsage* protUsa
if ( m_zone && ! m_host ) {
if ( onOff ) {
m_protocolUsage = 0;
- if ( KMFProtocolUsage* pro = m_zone->findProtocolUsageByProtocolUuid( protUsage->protocol()->uuid() ) ) {
+ KMFProtocolUsage* pro;
+ if ( pro = m_zone->findProtocolUsageByProtocolUuid( protUsage->protocol()->uuid() ) ) {
m_protocolUsage = pro;
} else {
KMFUndoEngine::instance()->startTransaction(
m_zone,
i18n("Add protocol %1 to zone %2.").arg( protUsage->protocol()->name() ).arg( m_zone->guiName() )
);
- KMFProtocolUsage * prot = m_zone->addProtocolUsage( protUsage->protocol()->uuid(), protUsage->protocol()->getDOMTree() );
+ pro = m_zone->addProtocolUsage( protUsage->protocol()->uuid(), protUsage->protocol()->getDOMTree() );
if ( pro ) {
kdDebug() << "Added Protocol to zone: " << m_zone-> name() << endl;
@@ -341,15 +342,16 @@ void KMFGenericInterfaceProtocol::slotProtocolClicked( KMFProtocolUsage* protUsa
} else if ( m_host ) {
if ( onOff ) {
m_protocolUsage = 0;
+ KMFProtocolUsage* pro;
- if ( KMFProtocolUsage* pro = m_host->findProtocolUsageByProtocolUuid( protUsage->protocol()->uuid() ) ) {
+ if ( pro = m_host->findProtocolUsageByProtocolUuid( protUsage->protocol()->uuid() ) ) {
m_protocolUsage = pro;
} else {
KMFUndoEngine::instance()->startTransaction(
m_host,
i18n("Add protocol %1 to host %2.").arg( protUsage->protocol()->name() ).arg( m_host->guiName() )
);
- KMFProtocolUsage * prot = m_host->addProtocolUsage( protUsage->protocol()->uuid(), protUsage->protocol() ->getDOMTree() );
+ pro = m_host->addProtocolUsage( protUsage->protocol()->uuid(), protUsage->protocol() ->getDOMTree() );
if ( pro ) {
kdDebug() << "Added Protocol to host: " << m_host-> name() << endl;