kw1jjang / CalVoD

CalVoD
http://www.eecs.berkeley.edu/~kw1jjang/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

AF_INET is not properly set up. #5

Open kw1jjang opened 9 years ago

kw1jjang commented 9 years ago

Ref: http://stackoverflow.com/questions/1593946/what-is-af-inet-and-why-do-i-need-it

We used an ad-hoc patch to get around of the issue (Ryan and Jiayuan experienced it), but we need to find a clean way to resolve the issue.

chenjiayuan commented 9 years ago

For unknown reason, the original code in ftplib.py works on my laptop now

    def makepasv(self):
        if self.af == socket.AF_INET:
            host, port = parse227(self.sendcmd('PASV'))
        else:
            host, port = parse229(self.sendcmd('EPSV'), self.sock.getpeername())
        return host, port

according to the link that Kang provided: "For the most part, sticking with AF_INET for socket programming over a network is the safest option. There is also AF_INET6 for Internet Protocol v6 addresses." I've checked that AF_INET6 does not work in our project, sticking with AF_INET is ok.

@ryankashi can you double check if this still persist on your computer?

ryankashi commented 9 years ago

Mine still needs the first if statement commented out. I just checked it

chenjiayuan commented 9 years ago

will research on this later

kw1jjang commented 9 years ago

As we discussed, let's not worry about it at this point.