]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Moved KidIdentifier to globals to make pinger happy.
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 7 Jul 2010 03:17:47 +0000 (21:17 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Wed, 7 Jul 2010 03:17:47 +0000 (21:17 -0600)
Pinger and possibly other optional externals require KidIdentifier via
debugs(). Instead of making KidIdentifier global, we could add a "plugin" API
to add program-dependent stuff to debugs() and friends, but we should not add
that kind of complexity unless really necessary. We could also link pinger
with libipc.la but that will probably cause more problems with IPC
dependencies.

src/globals.h
src/ipc/Kids.cc
src/ipc/Kids.h

index 7eea3cb10dad193b74c95cc30f286a7e286d62b0..82431a715434a2bf7670cd2389f1b2808247f90f 100644 (file)
@@ -171,6 +171,9 @@ extern "C" {
     extern int opt_send_signal;        /* -1 */
     extern int opt_no_daemon; /* 0 */
 
+/// current Squid process number (e.g., 4).
+/// Zero for SMP-unaware code and in no-SMP mode.
+    extern int KidIdentifier; /* 0 */
 
 #ifdef __cplusplus
 }
index ede9d15d77896577883185d85d04e776830f6b27..ad0da3786e3033c3be35c38c65bc65741c429f36 100644 (file)
@@ -10,7 +10,6 @@
 
 Kids TheKids;
 char KidName[NAME_MAX];
-int  KidIdentifier;
 
 Kids::Kids()
 {
index dce7f14fbcb7674d9f299cc554deb618b7594cd3..d2432a9d51ca87bd82892e95d3ba064e7a278aaa 100644 (file)
@@ -49,7 +49,6 @@ private:
 extern Kids TheKids; ///< All kids being maintained
 
 extern char KidName[NAME_MAX]; ///< current Squid process name (e.g., squid2)
-extern int KidIdentifier; ///< current Squid process number (e.g., 4)
 
 
 #endif /* SQUID_IPC_KIDS_H */