]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix warnings in pythonmod changes.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 7 Jan 2015 09:29:59 +0000 (09:29 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 7 Jan 2015 09:29:59 +0000 (09:29 +0000)
git-svn-id: file:///svn/unbound/trunk@3311 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
pythonmod/interface.i
pythonmod/pythonmod_utils.h

index cf5678818c95e1d2072d8df16780b576b6eb3e9e..fab6058a3f38c2b5dd946cd88432b3d5a0f93ae1 100644 (file)
@@ -1,3 +1,6 @@
+7 January 2015: Wouter
+       - Fix warnings in pythonmod changes.
+
 6 January 2015: Wouter
        - iana portlist update.
        - patch for remote control over local sockets, from Dag-Erling
index 19ded4b33e284679cc30cbe5041bae816e4932e6..b2dd089043edb12f7fea6ca0421d90b59012106b 100644 (file)
@@ -28,6 +28,7 @@
    #include "services/mesh.h"
    #include "iterator/iter_delegpt.h"
    #include "iterator/iter_hints.h"
+   #include "iterator/iter_utils.h"
    #include "ldns/wire2str.h"
    #include "ldns/str2wire.h"
    #include "ldns/pkthdr.h"
@@ -980,7 +981,7 @@ int set_return_msg(struct module_qstate* qstate,
 
 /* Functions which we will need to lookup delegations */
 struct delegpt* dns_cache_find_delegation(struct module_env* env,
-        char* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
+        uint8_t* qname, size_t qnamelen, uint16_t qtype, uint16_t qclass,
         struct regional* region, struct dns_msg** msg, uint32_t timenow);
 int iter_dp_is_useless(struct query_info* qinfo, uint16_t qflags,
         struct delegpt* dp);
@@ -1004,22 +1005,22 @@ struct delegpt* find_delegation(struct module_qstate* qstate, char *nm, size_t n
     uint32_t timenow = *qstate->env->now;
 
     regional_free_all(region);
-    qinfo.qname = nm;
+    qinfo.qname = (uint8_t*)nm;
     qinfo.qname_len = nmlen;
     qinfo.qtype = LDNS_RR_TYPE_A;
     qinfo.qclass = LDNS_RR_CLASS_IN;
 
     while(1) {
-        dp = dns_cache_find_delegation(qstate->env, nm, nmlen, qinfo.qtype, qinfo.qclass, region, &msg, timenow);
+        dp = dns_cache_find_delegation(qstate->env, (uint8_t*)nm, nmlen, qinfo.qtype, qinfo.qclass, region, &msg, timenow);
         if(!dp)
             return NULL;
         if(iter_dp_is_useless(&qinfo, BIT_RD, dp)) {
-            if (dname_is_root(nm))
+            if (dname_is_root((uint8_t*)nm))
                 return NULL;
-            nm = dp->name;
+            nm = (char*)dp->name;
             nmlen = dp->namelen;
             dname_remove_label((uint8_t**)&nm, &nmlen);
-            dname_str(nm, b);
+            dname_str((uint8_t*)nm, b);
             continue;
         }
         stub = hints_lookup_stub(qstate->env->hints, qinfo.qname, qinfo.qclass, dp);
index a901f391a460b98849b8043517d76f6f795e43da..768eb46de6ac9253d96d78e484668b6c29880af4 100644 (file)
@@ -42,6 +42,7 @@
 #define PYTHONMOD_UTILS_H
 
 #include "util/module.h"
+struct delegpt_addr;
 
 /**
  *  Store the reply_info and query_info pair in message cache (qstate->msg_cache)
@@ -86,4 +87,7 @@ int createResponse(struct module_qstate* qstate, sldns_buffer* pkt);
  */
 void reply_addr2str(struct comm_reply* reply, char* dest, int maxlen);
 
+/* Convert target->addr to string */
+void delegpt_addr_addr2str(struct delegpt_addr* target, char *dest, int maxlen);
+
 #endif /* PYTHONMOD_UTILS_H */