=== modified file 'src/client_side.cc' --- src/client_side.cc 2011-06-23 08:31:56 +0000 +++ src/client_side.cc 2011-07-18 16:24:16 +0000 @@ -136,41 +136,44 @@ #endif #if LINGERING_CLOSE #define comm_close comm_lingering_close #endif /// dials clientListenerConnectionOpened call class ListeningStartedDialer: public CallDialer, public Ipc::StartListeningCb { public: typedef void (*Handler)(http_port_list *portCfg, const Ipc::FdNoteId note, const Subscription::Pointer &sub); ListeningStartedDialer(Handler aHandler, http_port_list *aPortCfg, const Ipc::FdNoteId note, const Subscription::Pointer &aSub): handler(aHandler), portCfg(aPortCfg), portTypeNote(note), sub(aSub) {} virtual void print(std::ostream &os) const { startPrint(os) << ", " << FdNote(portTypeNote) << " port=" << (void*)portCfg << ')'; } virtual bool canDial(AsyncCall &) const { return true; } - virtual void dial(AsyncCall &) { (handler)(portCfg, portTypeNote, sub); } + virtual void dial(AsyncCall &) { + portCfg->listenConn = conn; + (handler)(portCfg, portTypeNote, sub); + } public: Handler handler; private: http_port_list *portCfg; ///< from Config.Sockaddr.http Ipc::FdNoteId portTypeNote; ///< Type of IPC socket being opened Subscription::Pointer sub; ///< The handler to be subscribed for this connetion listener }; static void clientListenerConnectionOpened(http_port_list *s, const Ipc::FdNoteId portTypeNote, const Subscription::Pointer &sub); /* our socket-related context */ CBDATA_CLASS_INIT(ClientSocketContext); void * ClientSocketContext::operator new (size_t byteCount) {