]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
fix bug in find_node not encoding target properly
authorburris <burris>
Fri, 13 Sep 2002 20:57:27 +0000 (20:57 +0000)
committerburris <burris>
Fri, 13 Sep 2002 20:57:27 +0000 (20:57 +0000)
khashmir.py
knode.py

index d8b9df4ff1132c2ee5849652ca2535f635c07510..7eec1c80fe1bc0b843a29a6fbaca792176f31a7c 100644 (file)
@@ -211,7 +211,7 @@ class Khashmir(xmlrpc.XMLRPC):
        return self.node.senderDict()
                
     def xmlrpc_find_node(self, target, sender):
-       nodes = self.table.findNodes(target)
+       nodes = self.table.findNodes(target.data)
        nodes = map(lambda node: node.senderDict(), nodes)
        ip = self.crequest.getClientIP()
        sender['host'] = ip
index 8a38462e46430bdb20ee96c02212c73312475334..c9a41ddd3af108db5c22dc6508324eb4404b1cf4 100644 (file)
--- a/knode.py
+++ b/knode.py
@@ -12,7 +12,7 @@ class KNode(Node):
        return df
     def findNode(self, target, sender):
        df = Deferred()
-       f = factory('find_node', (target, sender), df.callback, df.errback)
+       f = factory('find_node', (Binary(target), sender), df.callback, df.errback)
        reactor.connectTCP(self.host, self.port, f)
        return df
     def storeValue(self, key, value, sender):