summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-04-17 17:04:05 +0000
committerRobin Millette <millette@controlyourself.ca>2009-04-17 17:04:05 +0000
commite5094c3359fb74caeea474f8e08eb0d15b477652 (patch)
tree9d60785414e80a5bad75e3e45ab542a0c9f0352b /scripts
parent55d7bb4701ca39fb8f4b859b19defdfc7af0142c (diff)
parent2eb1eb86838b47af7305dbd21a181e63bcd58418 (diff)
fix merge conflict 0.7.x 0.8.x in util.php and register.php.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/jabberqueuehandler.php9
-rwxr-xr-xscripts/publicqueuehandler.php7
-rwxr-xr-xscripts/xmppconfirmhandler.php7
-rwxr-xr-xscripts/xmppdaemon.php7
4 files changed, 29 insertions, 1 deletions
diff --git a/scripts/jabberqueuehandler.php b/scripts/jabberqueuehandler.php
index 924fc4545..8b6e974c0 100755
--- a/scripts/jabberqueuehandler.php
+++ b/scripts/jabberqueuehandler.php
@@ -54,6 +54,13 @@ class JabberQueueHandler extends XmppQueueHandler
}
}
+// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
+// lots of CPU trying to connect to unconfigured servers
+if (common_config('xmpp','enabled')==false) {
+ print "Aborting daemon - xmpp is disabled\n";
+ exit();
+}
+
ini_set("max_execution_time", "0");
ini_set("max_input_time", "0");
set_time_limit(0);
@@ -63,4 +70,4 @@ $resource = ($argc > 1) ? $argv[1] : (common_config('xmpp','resource') . '-queue
$handler = new JabberQueueHandler($resource);
-$handler->runOnce(); \ No newline at end of file
+$handler->runOnce();
diff --git a/scripts/publicqueuehandler.php b/scripts/publicqueuehandler.php
index 5075c12df..b0fa22d43 100755
--- a/scripts/publicqueuehandler.php
+++ b/scripts/publicqueuehandler.php
@@ -52,6 +52,13 @@ class PublicQueueHandler extends XmppQueueHandler
}
}
+// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
+// lots of CPU trying to connect to unconfigured servers
+if (common_config('xmpp','enabled')==false) {
+ print "Aborting daemon - xmpp is disabled\n";
+ exit();
+}
+
ini_set("max_execution_time", "0");
ini_set("max_input_time", "0");
set_time_limit(0);
diff --git a/scripts/xmppconfirmhandler.php b/scripts/xmppconfirmhandler.php
index 2b8b085ce..7f39235fe 100755
--- a/scripts/xmppconfirmhandler.php
+++ b/scripts/xmppconfirmhandler.php
@@ -140,6 +140,13 @@ class XmppConfirmHandler extends XmppQueueHandler
}
}
+// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
+// lots of CPU trying to connect to unconfigured servers
+if (common_config('xmpp','enabled')==false) {
+ print "Aborting daemon - xmpp is disabled\n";
+ exit();
+}
+
ini_set("max_execution_time", "0");
ini_set("max_input_time", "0");
set_time_limit(0);
diff --git a/scripts/xmppdaemon.php b/scripts/xmppdaemon.php
index ef3f8c63d..0ce2f2a28 100755
--- a/scripts/xmppdaemon.php
+++ b/scripts/xmppdaemon.php
@@ -321,6 +321,13 @@ class XMPPDaemon extends Daemon
}
}
+// Abort immediately if xmpp is not enabled, otherwise the daemon chews up
+// lots of CPU trying to connect to unconfigured servers
+if (common_config('xmpp','enabled')==false) {
+ print "Aborting daemon - xmpp is disabled\n";
+ exit();
+}
+
ini_set("max_execution_time", "0");
ini_set("max_input_time", "0");
set_time_limit(0);