/*
- * $Id$
- *
- * DEBUG: section 54 Interprocess Communication
+ * Copyright (C) 1996-2017 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 54 Interprocess Communication */
+
+#include "squid.h"
#include "base/Subscription.h"
#include "base/TextException.h"
+#include "CacheManager.h"
+#include "CollapsedForwarding.h"
#include "comm/Connection.h"
-#include "ipc/Strand.h"
-#include "ipc/StrandCoord.h"
+#include "fatal.h"
+#include "globals.h"
+#include "ipc/Kids.h"
#include "ipc/Messages.h"
#include "ipc/SharedListen.h"
+#include "ipc/Strand.h"
+#include "ipc/StrandCoord.h"
#include "ipc/StrandSearch.h"
-#include "ipc/Kids.h"
+#include "mgr/Forwarder.h"
#include "mgr/Request.h"
#include "mgr/Response.h"
-#include "mgr/Forwarder.h"
-#include "SwapDir.h" /* XXX: scope boundary violation */
-#include "CacheManager.h"
-#if USE_DISKIO_IPCIO
+#if HAVE_DISKIO_MODULE_IPCIO
#include "DiskIO/IpcIo/IpcIoFile.h" /* XXX: scope boundary violation */
#endif
#if SQUID_SNMP
CBDATA_NAMESPACED_CLASS_INIT(Ipc, Strand);
-
Ipc::Strand::Strand():
- Port(MakeAddr(strandAddrPfx, KidIdentifier)),
- isRegistered(false)
+ Port(MakeAddr(strandAddrLabel, KidIdentifier)),
+ isRegistered(false)
{
}
HereIamMessage ann(StrandCoord(KidIdentifier, getpid()));
TypedMsgHdr message;
ann.pack(message);
- SendMessage(coordinatorAddr, message);
+ SendMessage(Port::CoordinatorAddr(), message);
setTimeout(6, "Ipc::Strand::timeoutHandler"); // TODO: make 6 configurable?
}
SharedListenJoined(SharedListenResponse(message));
break;
-#if USE_DISKIO_IPCIO
+#if HAVE_DISKIO_MODULE_IPCIO
case mtStrandSearchResponse:
IpcIoFile::HandleOpenResponse(StrandSearchResponse(message));
break;
case mtIpcIoNotification:
IpcIoFile::HandleNotification(message);
break;
-#endif /* USE_DISKIO_IPCIO */
+#endif /* HAVE_DISKIO_MODULE_IPCIO */
case mtCacheMgrRequest: {
const Mgr::Request req(message);
}
break;
+ case mtCollapsedForwardingNotification:
+ CollapsedForwarding::HandleNotification(message);
+ break;
+
#if SQUID_SNMP
case mtSnmpRequest: {
const Snmp::Request req(message);
#endif
default:
- debugs(54, 1, HERE << "Unhandled message type: " << message.type());
+ debugs(54, DBG_IMPORTANT, HERE << "Unhandled message type: " << message.type());
break;
}
}
if (!isRegistered)
fatalf("kid%d registration timed out", KidIdentifier);
}
+