]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
optionally turn encryption on or off in the XMPP connection
authorEvan Prodromou <evan@prodromou.name>
Tue, 26 Aug 2008 13:18:14 +0000 (09:18 -0400)
committerEvan Prodromou <evan@prodromou.name>
Tue, 26 Aug 2008 13:18:14 +0000 (09:18 -0400)
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

config.php.sample
lib/common.php
lib/jabber.php

index e5dfdbae2abb7a082d978b95ffb9cb6a9d830baa..bfcbf26a9688e1d993245d4bced314cabd98b104 100644 (file)
@@ -54,6 +54,7 @@ $config['db']['database'] = 'mysql://laconica:microblog@localhost/laconica';
 #$config['xmpp']['server'] = 'server.example.net';
 #$config['xmpp']['port'] = 5222;
 #$config['xmpp']['user'] = 'update';
+#$config['xmpp']['encryption'] = false;
 #$config['xmpp']['resource'] = 'uniquename';
 #$config['xmpp']['password'] = 'blahblahblah';
 #$config['xmpp']['public'][] = 'someindexer@example.net';
index 13c7d0d458048cae70a9025d39f7f8b5b2e6bc82..e4c8e9032a9bc66c1e78a5a46c09648e62026928 100644 (file)
@@ -86,6 +86,7 @@ $config =
                          'server' => 'INVALID SERVER',
                          'port' => 5222,
                          'user' => 'update',
+                         'encryption' => true,
                          'resource' => 'uniquename',
                          'password' => 'blahblahblah',
                          'host' => NULL, # only set if != server
index cba7f62c4cb38400b0d88a54a688eea67a94275a..01ec8da43951b8c8a2893a23695b761bc44a1bc9 100644 (file)
@@ -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;
                }