Further minor ssl relo fixes.

Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
This commit is contained in:
Keir Fraser committed 2008-05-13 09:20:23 +01:00
1 parent 6c922a2cef
commit a6cd3290d8
1 file changed
+6 -2
+6 -2
View File
@@ -135,13 +135,15 @@ class SSLSocketServerConnection(SocketServerConnection):
received data to one end of the pipe, then read from the other end:
p2cread, p2cwrite = os.pipe()
threading.Thread(target=connection.recv2fd, args=(sock, p2cwrite)).start()
threading.Thread(target=connection.SSLSocketServerConnection.recv2fd,
args=(sock, p2cwrite)).start()
os.read(p2cread, 1024)
To use fd2send():
p2cread, p2cwrite = os.pipe()
threading.Thread(target=connection.fd2send, args=(sock, p2cread)).start()
threading.Thread(target=connection.SSLSocketServerConnection.fd2send,
args=(sock, p2cread)).start()
os.write(p2cwrite, "data")
"""
@@ -233,6 +235,7 @@ class SSLSocketServerConnection(SocketServerConnection):
recv2fd = staticmethod(recv2fd)
def fd2send(sock, fd):
try:
while True:
@@ -278,6 +281,7 @@ class SSLSocketServerConnection(SocketServerConnection):
fd2send = staticmethod(fd2send)
def hostAllowed(addrport, hosts_allowed):
if hosts_allowed is None:
return True
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.