mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-20 10:17:16 +01:00
fixed SF bug 3238026: build
failure on systems without net-snmp development libraries.
This commit is contained in:
parent
1612ad88cd
commit
ee35e66818
2
VERSION
2
VERSION
@ -7,7 +7,7 @@ FWB_MICRO_VERSION=0
|
||||
# build number is like "nano" version number. I am incrementing build
|
||||
# number during development cycle
|
||||
#
|
||||
BUILD_NUM="3506"
|
||||
BUILD_NUM="3507"
|
||||
|
||||
VERSION="$FWB_MAJOR_VERSION.$FWB_MINOR_VERSION.$FWB_MICRO_VERSION.$BUILD_NUM"
|
||||
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
#define VERSION "4.2.0.3506"
|
||||
#define VERSION "4.2.0.3507"
|
||||
#define GENERATION "4.2"
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
2011-03-23 Vadim Kurland <vadim@netcitadel.com>
|
||||
|
||||
* FWWindow.cpp (prepareToolsMenu): fixed SF bug 3238026: build
|
||||
failure on systems without net-snmp development libraries.
|
||||
|
||||
2011-03-22 vadim <vadim@netcitadel.com>
|
||||
|
||||
* parsers/pix.g (acl_xoperator_src): first attempt at PIX/ASA
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
|
||||
%define name fwbuilder
|
||||
%define version 4.2.0.3506
|
||||
%define version 4.2.0.3507
|
||||
%define release 1
|
||||
|
||||
%if "%_vendor" == "MandrakeSoft"
|
||||
|
||||
@ -4,6 +4,6 @@ Replaces: fwbuilder (<=4.1.1-1), fwbuilder-common, fwbuilder-bsd, fwbuilder-linu
|
||||
Priority: extra
|
||||
Section: checkinstall
|
||||
Maintainer: vadim@fwbuilder.org
|
||||
Version: 4.2.0.3506-1
|
||||
Version: 4.2.0.3507-1
|
||||
Depends: libqt4-gui (>= 4.3.0), libxml2, libxslt1.1, libsnmp | libsnmp15
|
||||
Description: Firewall Builder GUI and policy compilers
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
|
||||
%define name fwbuilder
|
||||
%define version 4.2.0.3506
|
||||
%define version 4.2.0.3507
|
||||
%define release 1
|
||||
|
||||
%if "%_vendor" == "MandrakeSoft"
|
||||
|
||||
@ -1024,6 +1024,9 @@ void FWWindow::prepareFileMenu()
|
||||
|
||||
void FWWindow::prepareToolsMenu()
|
||||
{
|
||||
#ifndef HAVE_LIBSNMP
|
||||
m_mainWindow->SNMPDiscoveryAction->setEnabled(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
void FWWindow::prepareWindowsMenu()
|
||||
|
||||
@ -56,7 +56,9 @@ ND_ProgressPage::ND_ProgressPage(QWidget *parent) : QWizardPage(parent)
|
||||
m_dialog = new Ui::ND_ProgressPage_q;
|
||||
m_dialog->setupUi(this);
|
||||
|
||||
#ifdef HAVE_LIBSNMP
|
||||
crawler = NULL;
|
||||
#endif
|
||||
|
||||
QTextCursor cursor(m_dialog->discoveryLog->textCursor());
|
||||
normal_format = cursor.charFormat();
|
||||
@ -83,6 +85,8 @@ ND_ProgressPage::~ND_ProgressPage()
|
||||
disconnect(this, SLOT(logLine(QString)));
|
||||
disconnect(this, SLOT(crawlerFinished()));
|
||||
|
||||
#ifdef HAVE_LIBSNMP
|
||||
|
||||
if (crawler != NULL && crawler->isRunning())
|
||||
{
|
||||
if (fwbdebug_nd)
|
||||
@ -95,8 +99,11 @@ ND_ProgressPage::~ND_ProgressPage()
|
||||
// object is only deleted after snmp crawler has finished and
|
||||
// thread terminated
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBSNMP
|
||||
|
||||
bool ND_ProgressPage::validatePage()
|
||||
{
|
||||
ObjectDescriptorList *objects =
|
||||
@ -122,8 +129,6 @@ void ND_ProgressPage::initializePage()
|
||||
{
|
||||
if (fwbdebug_nd) qDebug() << "ND_ProgressPage::initializePage()";
|
||||
|
||||
#ifdef HAVE_LIBSNMP
|
||||
|
||||
ObjectDescriptorList *objects =
|
||||
dynamic_cast<SNMPNetworkDiscoveryWizard*>(wizard())->getObjects();
|
||||
|
||||
@ -198,9 +203,6 @@ void ND_ProgressPage::initializePage()
|
||||
this, SLOT(crawlerFinished()));
|
||||
|
||||
crawler->start();
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void ND_ProgressPage::cleanupPage()
|
||||
@ -392,3 +394,4 @@ void ND_ProgressPage::saveLog()
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -39,22 +39,28 @@ class ND_ProgressPage : public QWizardPage
|
||||
QTextCharFormat normal_format;
|
||||
QTextCharFormat error_format;
|
||||
QTextCharFormat warning_format;
|
||||
SNMPCrawlerThread *crawler;
|
||||
|
||||
|
||||
public:
|
||||
ND_ProgressPage(QWidget *parent);
|
||||
virtual ~ND_ProgressPage();
|
||||
|
||||
#ifdef HAVE_LIBSNMP
|
||||
|
||||
private:
|
||||
SNMPCrawlerThread *crawler;
|
||||
|
||||
virtual void initializePage();
|
||||
virtual void cleanupPage();
|
||||
virtual bool validatePage();
|
||||
|
||||
public slots:
|
||||
|
||||
void stop();
|
||||
void saveLog();
|
||||
void logLine(const QString &line);
|
||||
void crawlerDestroyed(QObject*);
|
||||
void crawlerFinished();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -31,6 +31,8 @@
|
||||
#include "QThreadLogger.h"
|
||||
#include "SNMPCrawlerThread.h"
|
||||
|
||||
#ifdef HAVE_LIBSNMP
|
||||
|
||||
// #include snmp.h only after all Qt headers; see #2185
|
||||
#include "fwbuilder/snmp.h"
|
||||
|
||||
@ -105,3 +107,4 @@ set<InetAddrMask*> SNMPCrawlerThread::getNetworks()
|
||||
return q->getNetworks();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
#include "fwbuilder/InetAddrMask.h"
|
||||
#include "fwbuilder/ThreadTools.h"
|
||||
|
||||
#ifdef HAVE_LIBSNMP
|
||||
|
||||
// avoid #include "snmp.h" since it conflicts with Qt, see #2185
|
||||
namespace libfwbuilder
|
||||
@ -77,5 +78,6 @@ signals:
|
||||
void finished();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user