Commit f3805885 authored by Michael Graff's avatar Michael Graff
Browse files

more review comments

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@582 e5f2f494-b856-4b98-b285-d166d9295462
parent 0102a47f
......@@ -39,13 +39,13 @@ class SubscriptionManager:
"""Remove the socket from the one specific subscription."""
target = ( group, instance )
if target in self.subscriptions:
while socket in self.subscriptions[target]:
if socket in self.subscriptions[target]:
self.subscriptions[target].remove(socket)
def unsubscribe_all(self, socket):
"""Remove the socket from all subscriptions."""
for socklist in self.subscriptions.values():
while socket in socklist:
if socket in socklist:
socklist.remove(socket)
def find_sub(self, group, instance):
......
......@@ -62,7 +62,7 @@ def _encode_length_and_type(data, datatype):
elif length < 0x00010000:
return(struct.pack(">B H", datatype | _ITEM_LENGTH_16, length) + data)
else:
return(struct.pack(">B I", datatype, length) + data)
return(struct.pack(">B I", datatype | _ITEM_LENGTH_32, length) + data)
def _pack_utf8(item):
"""Pack a string (utf-8) and its type/length prefix."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment