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
This commit is contained in:
Evan Prodromou 2008-08-26 09:18:14 -04:00
parent 4cc84c3225
commit 782fe0130f
3 changed files with 4 additions and 1 deletions

View File

@ -54,6 +54,7 @@ $config['db']['database'] = 'mysql://laconica:microblog@localhost/laconica';
#$config['xmpp']['server'] = 'server.example.net'; #$config['xmpp']['server'] = 'server.example.net';
#$config['xmpp']['port'] = 5222; #$config['xmpp']['port'] = 5222;
#$config['xmpp']['user'] = 'update'; #$config['xmpp']['user'] = 'update';
#$config['xmpp']['encryption'] = false;
#$config['xmpp']['resource'] = 'uniquename'; #$config['xmpp']['resource'] = 'uniquename';
#$config['xmpp']['password'] = 'blahblahblah'; #$config['xmpp']['password'] = 'blahblahblah';
#$config['xmpp']['public'][] = 'someindexer@example.net'; #$config['xmpp']['public'][] = 'someindexer@example.net';

View File

@ -86,6 +86,7 @@ $config =
'server' => 'INVALID SERVER', 'server' => 'INVALID SERVER',
'port' => 5222, 'port' => 5222,
'user' => 'update', 'user' => 'update',
'encryption' => true,
'resource' => 'uniquename', 'resource' => 'uniquename',
'password' => 'blahblahblah', 'password' => 'blahblahblah',
'host' => NULL, # only set if != server 'host' => NULL, # only set if != server

View File

@ -82,6 +82,7 @@ function jabber_connect($resource=NULL) {
XMPPHP_Log::LEVEL_VERBOSE : NULL XMPPHP_Log::LEVEL_VERBOSE : NULL
); );
$conn->autoSubscribe(); $conn->autoSubscribe();
$conn->useEncryption(common_config('xmpp', 'encryption'));
if (!$conn) { if (!$conn) {
return false; return false;