/*
- * $Id$
- *
- * DEBUG: section 16 Cache Manager API
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
*
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
*/
-#include "config.h"
+/* DEBUG: section 16 Cache Manager API */
+
+#include "squid.h"
#include "base/TextException.h"
+#include "comm/Connection.h"
#include "ipc/Messages.h"
#include "ipc/TypedMsgHdr.h"
#include "mgr/ActionParams.h"
#include "mgr/Request.h"
-
-Mgr::Request::Request(int aRequestorId, unsigned int aRequestId, int aFd,
+Mgr::Request::Request(int aRequestorId, unsigned int aRequestId, const Comm::ConnectionPointer &aConn,
const ActionParams &aParams):
- Ipc::Request(aRequestorId, aRequestId),
- fd(aFd), params(aParams)
+ Ipc::Request(aRequestorId, aRequestId),
+ conn(aConn),
+ params(aParams)
{
Must(requestorId > 0);
}
Mgr::Request::Request(const Request& request):
Ipc::Request(request.requestorId, request.requestId),
- fd(request.fd), params(request.params)
+ conn(request.conn), params(request.params)
{
}
msg.getPod(requestId);
params = ActionParams(msg);
- fd = msg.getFd();
+ conn = new Comm::Connection;
+ conn->fd = msg.getFd();
+ // For now we just have the FD.
+ // Address and connectio details wil be pulled/imported by the component later
}
void
msg.putPod(requestId);
params.pack(msg);
- msg.putFd(fd);
+ msg.putFd(conn->fd);
}
Ipc::Request::Pointer
{
return new Request(*this);
}
+