Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -852,15 +852,15 @@ |
853 | 853 | $text = preg_replace( '/^/m', $prefix . ' ', $text ); |
854 | 854 | |
855 | 855 | // Limit to 64KB |
856 | | - if ( strlen( $text ) > 65534 ) { |
857 | | - $text = substr( $text, 0, 65534 ); |
| 856 | + if ( strlen( $text ) > 65506 ) { |
| 857 | + $text = substr( $text, 0, 65505 ); |
858 | 858 | } |
859 | 859 | |
860 | 860 | if ( substr( $text, -1 ) != "\n" ) { |
861 | 861 | $text .= "\n"; |
862 | 862 | } |
863 | | - } elseif ( strlen( $text ) > 65535 ) { |
864 | | - $text = substr( $text, 0, 65535 ); |
| 863 | + } elseif ( strlen( $text ) > 65507 ) { |
| 864 | + $text = substr( $text, 0, 65506 ); |
865 | 865 | } |
866 | 866 | |
867 | 867 | $sock = socket_create( $domain, SOCK_DGRAM, SOL_UDP ); |
— | — | @@ -868,13 +868,7 @@ |
869 | 869 | return; |
870 | 870 | } |
871 | 871 | |
872 | | - $len = strlen( $text ); |
873 | | - $maxLen = socket_get_option( $sock, SOL_SOCKET, SO_SNDBUF ); |
874 | | - |
875 | | - if ( $len > $maxLen ) { |
876 | | - $len = $maxLen - 1; |
877 | | - } |
878 | | - socket_sendto( $sock, $text, $len, 0, $host, $port ); |
| 872 | + socket_sendto( $sock, $text, strlen( $text ), 0, $host, $port ); |
879 | 873 | socket_close( $sock ); |
880 | 874 | } else { |
881 | 875 | wfSuppressWarnings(); |