This commit is contained in:
Andrew Nicols
2020-05-15 08:56:10 +08:00
2 changed files with 5 additions and 2 deletions
+3
View File
@@ -155,6 +155,9 @@ class antivirus_clamav_tcpsockethost_setting extends antivirus_clamav_socket_set
}
$runningmethod = get_config('antivirus_clamav', 'runningmethod');
$tcpport = get_config('antivirus_clamav', 'tcpsocketport');
if ($tcpport === false) {
$tcpport = 3310;
}
if ($runningmethod === 'tcpsocket') {
return $this->validate_clamav_socket('tcp://' . $data . ':' . $tcpport);
}
+2 -2
View File
@@ -28,8 +28,8 @@ defined('MOODLE_INTERNAL') || die();
/** Default socket timeout */
define('ANTIVIRUS_CLAMAV_SOCKET_TIMEOUT', 10);
/** Default socket data stream chunk size */
define('ANTIVIRUS_CLAMAV_SOCKET_CHUNKSIZE', 1024);
/** Default socket data stream chunk size (32Mb: 32*1024*"024) */
define('ANTIVIRUS_CLAMAV_SOCKET_CHUNKSIZE', 33554432);
/**
* Class implementing ClamAV antivirus.