Author: ritchiem Date: Wed Oct 28 15:29:31 2009 New Revision: 830583 URL: http://svn.apache.org/viewvc?rev=830583&view=rev Log: Fix creating socket in the wrong place for listen()
Modified: qpid/branches/0.5.x-dev/qpid/cpp/src/qpid/sys/posix/Socket.cpp Modified: qpid/branches/0.5.x-dev/qpid/cpp/src/qpid/sys/posix/Socket.cpp URL: http://svn.apache.org/viewvc/qpid/branches/0.5.x-dev/qpid/cpp/src/qpid/sys/posix/Socket.cpp?rev=830583&r1=830582&r2=830583&view=diff ============================================================================== --- qpid/branches/0.5.x-dev/qpid/cpp/src/qpid/sys/posix/Socket.cpp (original) +++ qpid/branches/0.5.x-dev/qpid/cpp/src/qpid/sys/posix/Socket.cpp Wed Oct 28 15:29:31 2009 @@ -170,13 +170,13 @@ int Socket::listen(uint16_t port, int backlog) const { SocketAddress sa("", boost::lexical_cast<std::string>(port)); - - createSocket(sa); return listen(sa, backlog); } int Socket::listen(const SocketAddress& sa, int backlog) const { + createSocket(sa); + const int& socket = impl->fd; int yes=1; QPID_POSIX_CHECK(setsockopt(socket,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(yes))); --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org