summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-08-26 09:18:14 -0400
committerEvan Prodromou <evan@prodromou.name>2008-08-26 09:18:14 -0400
commit782fe0130fe0221923cd2ec2a2b037575315e741 (patch)
tree75ac4e10c6815d3d4afa8ca226bfce1453629853 /lib
parent4cc84c3225fb1ba5ac1641b5c73bf2821ff74011 (diff)
optionally turn encryption on or off in the XMPP connection
For identi.ca, we had some problems with the XMPP daemon getting "stuck" in I/O through the encrypted (by default) XMPP socket. Turning off encryption helped. So, now it's an option. darcs-hash:20080826131814-84dde-2c4a809c6fb666dfb4b96d0d61205fe418f4e4b4.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/common.php1
-rw-r--r--lib/jabber.php3
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/common.php b/lib/common.php
index 13c7d0d45..e4c8e9032 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -86,6 +86,7 @@ $config =
'server' => 'INVALID SERVER',
'port' => 5222,
'user' => 'update',
+ 'encryption' => true,
'resource' => 'uniquename',
'password' => 'blahblahblah',
'host' => NULL, # only set if != server
diff --git a/lib/jabber.php b/lib/jabber.php
index cba7f62c4..01ec8da43 100644
--- a/lib/jabber.php
+++ b/lib/jabber.php
@@ -82,7 +82,8 @@ function jabber_connect($resource=NULL) {
XMPPHP_Log::LEVEL_VERBOSE : NULL
);
$conn->autoSubscribe();
-
+ $conn->useEncryption(common_config('xmpp', 'encryption'));
+
if (!$conn) {
return false;
}