-bool OidentdConfigGenerator::update() {
- if (parseConfig())
- qDebug() << "oidentd config parsed successfully";
- else
- qDebug() << QString("parsing oidentd config failed (%1 [%2])").arg(_configFile->errorString()).arg(_configFile->error());
+bool OidentdConfigGenerator::addSocket(const CoreIdentity *identity, const QHostAddress &localAddress, quint16 localPort, const QHostAddress &peerAddress, quint16 peerPort) {
+ qDebug() << "localAddress" << localAddress;
+ qDebug() << "localPort" << localPort;
+ qDebug() << "peerAddress" << peerAddress;
+ qDebug() << "peerPort" << peerPort;
+ qDebug() << "ident" << identity->ident();
+
+ QString ident = identity->ident();
+
+ _config.append(QString("lport %1 { reply \"%2\" } #%3\n").arg(localPort).arg(ident).arg(configTag));