/offlineimap/head: changeset 457
Made OfflineIMAP IPv6-aware. Used the short patch from Adriaan Peeters <apeeters@lashout.net> in Debian bug report 186636. Closes: #186636.
This commit is contained in:
		| @@ -10,6 +10,9 @@ offlineimap (3.99.15) unstable; urgency=low | ||||
|     error message would not have been visible.  Closes: #185709. | ||||
|   * Fixed a silly error relating to handling of the remotepassfile. | ||||
|     Closes: #189935. | ||||
|   * Made OfflineIMAP IPv6-aware.  Used the short patch from | ||||
|     Adriaan Peeters <apeeters@lashout.net> in Debian bug report 186636. | ||||
|     Closes: #186636. | ||||
|  | ||||
|  -- John Goerzen <jgoerzen@complete.org>  Mon, 28 Apr 2003 14:00:32 -0500 | ||||
|  | ||||
|   | ||||
| @@ -217,8 +217,16 @@ class IMAP4: | ||||
|         """ | ||||
|         self.host = host | ||||
|         self.port = port | ||||
|         self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||||
|         self.sock.connect((host, port)) | ||||
|         #This connects to the first ip found ipv4/ipv6 | ||||
|         #Added by Adriaan Peeters <apeeters@lashout.net> based on a socket | ||||
|         #example from the python documentation: | ||||
|         #http://www.python.org/doc/lib/socket-example.html | ||||
|         res = socket.getaddrinfo(host, port, socket.AF_UNSPEC, | ||||
|                                  socket.SOCK_STREAM) | ||||
|         af, socktype, proto, canonname, sa = res[0] | ||||
|         self.sock = socket.socket(af, socktype, proto) | ||||
|         self.sock.connect(sa) | ||||
|          | ||||
|         self.file = self.sock.makefile('rb') | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jgoerzen
					jgoerzen