Skip to content

Commit

Permalink
MDL-29463 - Chat - Change socket_setopt to socket_set_options
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnfwlr committed Sep 8, 2012
1 parent 935c3d5 commit 24eb089
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mod/chat/chatd.php
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ function init_sockets() {

// [pj]: I really must have a good read on sockets. What exactly does this do?
// http://www.unixguide.net/network/socketfaq/4.5.shtml is still not enlightening enough for me.
socket_setopt($this->listen_socket, SOL_SOCKET, SO_REUSEADDR, 1);
socket_set_option($this->listen_socket, SOL_SOCKET, SO_REUSEADDR, 1);
socket_set_nonblock($this->listen_socket);
}

Expand Down Expand Up @@ -915,8 +915,8 @@ function cli_switch($switch, $param = NULL) {
die();
}

if (!function_exists('socket_setopt')) {
echo "Error: Function socket_setopt() does not exist.\n";
if (!function_exists('socket_set_option')) {
echo "Error: Function socket_set_option() does not exist.\n";
echo "Possibly PHP has not been compiled with --enable-sockets.\n\n";
die();
}
Expand Down

0 comments on commit 24eb089

Please sign in to comment.