aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRubén Calvo <rubencm@gmail.com>2017-04-04 14:14:48 +0200
committerRubén Calvo <rubencm@gmail.com>2017-04-04 14:14:48 +0200
commiteadd5851d00e7af813b9175e3ae4ccbe5b7ec58d (patch)
treec3758a1c7d2550a1acdbdec9844a2683072fc893
parentd44dde390ac646dcc22aa3266d409be3cbbb2001 (diff)
downloadforums-eadd5851d00e7af813b9175e3ae4ccbe5b7ec58d.tar
forums-eadd5851d00e7af813b9175e3ae4ccbe5b7ec58d.tar.gz
forums-eadd5851d00e7af813b9175e3ae4ccbe5b7ec58d.tar.bz2
forums-eadd5851d00e7af813b9175e3ae4ccbe5b7ec58d.tar.xz
forums-eadd5851d00e7af813b9175e3ae4ccbe5b7ec58d.zip
[ticket/15150] Use stream_* functions instead of socket_* functions
PHPBB3-15150
-rw-r--r--phpBB/includes/functions_jabber.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/phpBB/includes/functions_jabber.php b/phpBB/includes/functions_jabber.php
index 842910a023..0479e102ac 100644
--- a/phpBB/includes/functions_jabber.php
+++ b/phpBB/includes/functions_jabber.php
@@ -102,7 +102,7 @@ class jabber
*/
static public function can_use_tls()
{
- if (!@extension_loaded('openssl') || !function_exists('stream_socket_enable_crypto') || !function_exists('stream_get_meta_data') || !function_exists('socket_set_blocking') || !function_exists('stream_get_wrappers'))
+ if (!@extension_loaded('openssl') || !function_exists('stream_socket_enable_crypto') || !function_exists('stream_get_meta_data') || !function_exists('stream_set_blocking') || !function_exists('stream_get_wrappers'))
{
return false;
}
@@ -268,8 +268,8 @@ class jabber
if ($this->connection = @stream_socket_client($remote_socket, $errorno, $errorstr, $this->timeout, STREAM_CLIENT_CONNECT, $socket_context))
{
- socket_set_blocking($this->connection, 0);
- socket_set_timeout($this->connection, 60);
+ stream_set_blocking($this->connection, 0);
+ stream_set_timeout($this->connection, 60);
return true;
}
@@ -586,7 +586,7 @@ class jabber
case 'proceed':
// continue switching to TLS
$meta = stream_get_meta_data($this->connection);
- socket_set_blocking($this->connection, 1);
+ stream_set_blocking($this->connection, 1);
if (!stream_socket_enable_crypto($this->connection, true, STREAM_CRYPTO_METHOD_TLS_CLIENT))
{
@@ -594,7 +594,7 @@ class jabber
return false;
}
- socket_set_blocking($this->connection, $meta['blocked']);
+ stream_set_blocking($this->connection, $meta['blocked']);
$this->session['tls'] = true;
// new stream