Browse Source

Renamed QDnsServer params

develop
Robin Thoni 6 years ago
parent
commit
cf87146e58

+ 2
- 2
src/modules/dns-server/includes/dns-server/QDnsServer.h View File

@@ -25,14 +25,14 @@ namespace QDns
25 25
 
26 26
             struct OnRequestParams
27 27
             {
28
-                QDns::Base::QDnsPacket packet;
28
+                QDns::Base::QDnsPacket query;
29 29
                 QHostAddress senderAddress;
30 30
                 quint16 senderPort;
31 31
                 std::function<void(SendAnswerParams)> sendAnswer;
32 32
             };
33 33
 
34 34
         signals:
35
-            void onRequest(OnRequestParams params);
35
+            void onRequest(OnRequestParams params); // TODO add onError
36 36
 
37 37
         public slots:
38 38
             virtual bool start(const QHostAddress& host, quint16 port) = 0;

+ 1
- 1
src/modules/dns-server/tests/DnsTcpServer.cpp View File

@@ -35,7 +35,7 @@ TEST_P(DnsTcpServerTest, simple)
35 35
     QList<QDns::Base::QDnsPacket> packets;
36 36
     QObject::connect(&server, &QDns::Server::QDnsServer::onRequest, [&packets](QDns::Server::QDnsServer::OnRequestParams params)
37 37
     {
38
-        packets.append(params.packet);
38
+        packets.append(params.query);
39 39
     });
40 40
     QList<QDns::Base::QDnsPacket> expectedPackets;
41 41
     QTcpSocket socket;

+ 1
- 1
src/modules/dns-server/tests/UdpDnsServer.cpp View File

@@ -34,7 +34,7 @@ TEST_P(DnsUdpServerTest, simple)
34 34
     QList<QDns::Base::QDnsPacket> packets;
35 35
     QObject::connect(&server, &QDns::Server::QDnsServer::onRequest, [&packets](QDns::Server::QDnsServer::OnRequestParams params)
36 36
     {
37
-        packets.append(params.packet);
37
+        packets.append(params.query);
38 38
     });
39 39
     QList<QDns::Base::QDnsPacket> expectedPackets;
40 40
     QUdpSocket socket;

Loading…
Cancel
Save