Create and print activation hash on request
To request, pass option -a on the command-line
This commit is contained in:
parent
46a54fd56b
commit
4be8a2969d
@ -86,7 +86,11 @@ int main(int argc, char *argv[])
|
|||||||
app.applicationName().toLower());
|
app.applicationName().toLower());
|
||||||
qDebug("Settings: %s", qPrintable(appSettings->fileName()));
|
qDebug("Settings: %s", qPrintable(appSettings->fileName()));
|
||||||
|
|
||||||
initTurbo();
|
if (!initTurbo())
|
||||||
|
{
|
||||||
|
exitCode = 1;
|
||||||
|
goto _exit2;
|
||||||
|
}
|
||||||
|
|
||||||
drone = new Drone();
|
drone = new Drone();
|
||||||
OstProtocolManager = new ProtocolManager();
|
OstProtocolManager = new ProtocolManager();
|
||||||
@ -116,6 +120,7 @@ _exit:
|
|||||||
delete drone;
|
delete drone;
|
||||||
delete OstProtocolManager;
|
delete OstProtocolManager;
|
||||||
|
|
||||||
|
_exit2:
|
||||||
google::protobuf::ShutdownProtobufLibrary();
|
google::protobuf::ShutdownProtobufLibrary();
|
||||||
|
|
||||||
fprintf(stderr, "done.\n");
|
fprintf(stderr, "done.\n");
|
||||||
|
@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||||||
|
|
||||||
#include "params.h"
|
#include "params.h"
|
||||||
#include "pcapextra.h"
|
#include "pcapextra.h"
|
||||||
|
#include "turbo.h"
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
@ -55,6 +56,10 @@ int Params::parseCommandLine(int argc, char* argv[])
|
|||||||
exit(0);
|
exit(0);
|
||||||
case 'h':
|
case 'h':
|
||||||
default:
|
default:
|
||||||
|
if (c != 'h') {
|
||||||
|
if (processTurboOption(optopt))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
printf("usage: %s [-dhv] [-p <port-number>]\n", argv[0]);
|
printf("usage: %s [-dhv] [-p <port-number>]\n", argv[0]);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -19,9 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||||||
|
|
||||||
#include "turbo.h"
|
#include "turbo.h"
|
||||||
|
|
||||||
void initTurbo()
|
bool initTurbo()
|
||||||
{
|
{
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isTurboPort(const char* device)
|
bool isTurboPort(const char* device)
|
||||||
@ -34,5 +34,9 @@ AbstractPort* createTurboPort(int id, const char* device)
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool processTurboOption(int /*opt*/)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -22,9 +22,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
|||||||
|
|
||||||
class AbstractPort;
|
class AbstractPort;
|
||||||
|
|
||||||
void initTurbo();
|
bool initTurbo();
|
||||||
bool isTurboPort(const char* device);
|
bool isTurboPort(const char* device);
|
||||||
AbstractPort* createTurboPort(int id, const char* device);
|
AbstractPort* createTurboPort(int id, const char* device);
|
||||||
|
bool processTurboOption(int opt);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user