]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Reformat
authorOtto <otto.moerbeek@open-xchange.com>
Tue, 7 Dec 2021 16:46:30 +0000 (17:46 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Tue, 7 Dec 2021 16:46:30 +0000 (17:46 +0100)
pdns/lua-recursor4-ffi.hh
pdns/lua-recursor4.cc
pdns/lua-recursor4.hh

index a607fd25bd8b25c5ee0e4eebea5c3fe5f6764ba7..5b78b416271d97e1f171b8c47e7b98a9304792fc 100644 (file)
@@ -56,7 +56,8 @@ extern "C"
     pdns_policy_kind_custom = 5
   } pdns_policy_kind_t;
 
-  typedef struct pdns_ffi_record {
+  typedef struct pdns_ffi_record
+  {
     const char* name;
     const char* content;
     size_t content_len;
@@ -117,7 +118,7 @@ extern "C"
   uint16_t pdns_postresolve_ffi_handle_get_rcode(const pdns_postresolve_ffi_handle_t* ref) __attribute__((visibility("default")));
   pdns_policy_kind_t pdns_postresolve_ffi_handle_get_appliedpolicy_kind(const pdns_postresolve_ffi_handle_t* ref) __attribute__((visibility("default")));
   void pdns_postresolve_ffi_handle_set_appliedpolicy_kind(pdns_postresolve_ffi_handle_t* ref, pdns_policy_kind_t kind) __attribute__((visibility("default")));
-  bool pdns_postresolve_ffi_handle_get_record(pdns_postresolve_ffi_handle_t* ref, unsigned int i, pdns_ffi_record_t *record, bool raw) __attribute__((visibility("default")));
+  bool pdns_postresolve_ffi_handle_get_record(pdns_postresolve_ffi_handle_t* ref, unsigned int i, pdns_ffi_record_trecord, bool raw) __attribute__((visibility("default")));
   bool pdns_postresolve_ffi_handle_set_record(pdns_postresolve_ffi_handle_t* ref, unsigned int i, const char* content, size_t contentLen, bool raw) __attribute__((visibility("default")));
   void pdns_postresolve_ffi_handle_clear_records(pdns_postresolve_ffi_handle_t* ref) __attribute__((visibility("default")));
   bool pdns_postresolve_ffi_handle_add_record(pdns_postresolve_ffi_handle_t* ref, const char* name, uint16_t type, uint32_t ttl, const char* content, size_t contentLen, pdns_record_place_t place, bool raw) __attribute__((visibility("default")));
index 3d9ed867aa57b234b3e3461676c78d49db45ed73..95b7a45f34bf3c6c99e3db29e45b9afae08b2a24 100644 (file)
@@ -1048,6 +1048,7 @@ public:
     const auto it = pool.insert(std::move(str)).first;
     return it;
   }
+
 private:
   std::unordered_set<std::string> pool;
 };
@@ -1089,7 +1090,7 @@ void pdns_postresolve_ffi_handle_set_appliedpolicy_kind(pdns_postresolve_ffi_han
   ref->handle.d_dq.appliedPolicy->d_kind = static_cast<DNSFilterEngine::PolicyKind>(kind);
 }
 
-bool pdns_postresolve_ffi_handle_get_record(pdns_postresolve_ffi_handle_t* ref, unsigned int i, pdns_ffi_record_t *record, bool raw)
+bool pdns_postresolve_ffi_handle_get_record(pdns_postresolve_ffi_handle_t* ref, unsigned int i, pdns_ffi_record_trecord, bool raw)
 {
   if (i >= ref->handle.d_dq.currentRecords->size()) {
     return false;
@@ -1101,7 +1102,8 @@ bool pdns_postresolve_ffi_handle_get_record(pdns_postresolve_ffi_handle_t* ref,
       auto content = ref->insert(r.d_content->serialize(r.d_name, true));
       record->content = content->data();
       record->content_len = content->size();
-    } else {
+    }
+    else {
       auto content = ref->insert(r.d_content->getZoneRepresentation());
       record->content = content->data();
       record->content_len = content->size();
@@ -1127,7 +1129,8 @@ bool pdns_postresolve_ffi_handle_set_record(pdns_postresolve_ffi_handle_t* ref,
     DNSRecord& r = ref->handle.d_dq.currentRecords->at(i);
     if (raw) {
       r.d_content = DNSRecordContent::deserialize(r.d_name, r.d_type, string(content, contentLen));
-    } else {
+    }
+    else {
       r.d_content = DNSRecordContent::mastermake(r.d_type, QClass::IN, string(content, contentLen));
     }
 
@@ -1155,7 +1158,8 @@ bool pdns_postresolve_ffi_handle_add_record(pdns_postresolve_ffi_handle_t* ref,
     dr.d_place = DNSResourceRecord::Place(place);
     if (raw) {
       dr.d_content = DNSRecordContent::deserialize(dr.d_name, dr.d_type, string(content, contentLen));
-    } else {
+    }
+    else {
       dr.d_content = DNSRecordContent::mastermake(type, QClass::IN, string(content, contentLen));
     }
     ref->handle.d_dq.currentRecords->push_back(std::move(dr));
index 0bb256679ed0b5ab369654f06920d80f31b20959..c877725982b55fa343d1042a20f8d42d38294418 100644 (file)
@@ -72,7 +72,6 @@ struct LuaContext::Pusher<pdns_postresolve_ffi_handle*>
   }
 };
 
-
 class RecursorLua4 : public BaseLua4
 {
 public:
@@ -224,10 +223,10 @@ public:
   typedef std::function<boost::optional<LuaContext::LuaObject>(pdns_ffi_param_t*)> gettag_ffi_t;
   gettag_ffi_t d_gettag_ffi;
 
-
   struct PostResolveFFIHandle
   {
-    PostResolveFFIHandle(DNSQuestion& dq) : d_dq(dq)
+    PostResolveFFIHandle(DNSQuestion& dq) :
+      d_dq(dq)
     {
     }
     DNSQuestion& d_dq;