diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1995-01-19 11:49:05 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1995-01-19 11:49:05 (GMT) |
commit | f90a113176df262aa7d495a57bdc0d09c8ac09bb (patch) | |
tree | c00b35ccb6a6110d3050d4211b23f95adfe51d46 /Mac | |
parent | a42960cd0948222ad6e2e08a427a8324a54c64fd (diff) | |
download | cpython-f90a113176df262aa7d495a57bdc0d09c8ac09bb.zip cpython-f90a113176df262aa7d495a57bdc0d09c8ac09bb.tar.gz cpython-f90a113176df262aa7d495a57bdc0d09c8ac09bb.tar.bz2 |
Fixed listen()/getsockname() bug
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Unsupported/mactcp/socket.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/Mac/Unsupported/mactcp/socket.py b/Mac/Unsupported/mactcp/socket.py index 852a653..3782eb5 100644 --- a/Mac/Unsupported/mactcp/socket.py +++ b/Mac/Unsupported/mactcp/socket.py @@ -125,9 +125,9 @@ class _tcpsocket(_socket): self.stream.ActiveOpen(self.port, _ipaddress(host), port) def getsockname(self): - st = self.stream.Status() - host = macdnr.AddrToStr(st.localHost) - return host, st.localPort + host, port = self.stream.GetSockName() + host = macdnr.AddrToStr(host) + return host, port def getpeername(self): st = self.stream.Status() @@ -147,9 +147,6 @@ class _tcpsocket(_socket): if not self.databuf: try: self.databuf, urg, mark = self.stream.Rcv(0) - if not self.databuf: - print '** socket: no data!' - print '** recv: got ', len(self.databuf) except mactcp.error, arg: if arg[0] != MACTCP.connectionClosing: raise mactcp.error, arg @@ -211,7 +208,6 @@ class _socketfile: i = string.index(self.buf, '\n') rv = self.buf[:i+1] self.buf = self.buf[i+1:] - print '** Readline:',self, `rv` return rv def write(self, buf): |