Added simple test implementation of tftpserver

Renamed lib/tftpserver.php to lib/tftp.php
Fixed error output from lib/tftp.php

Note: current simple tftpserver.php test implementation stores/read files
from memory (not fs). So you need to put a file, before you can get that
file back.

Signed-off-by: Diederik de Groot <ddegroot@talon.nl>
This commit is contained in:
Diederik de Groot
2020-02-17 02:41:01 +01:00
parent 8ea03118c6
commit 8950fb92f8
2 changed files with 140 additions and 1 deletions

View File

@@ -612,7 +612,10 @@ class TFTPServer {
while(true) {
$read = array($this->_socket);
$r = stream_select($read, $write = null, $excpt = null, 1);
//$r = stream_select($read, $write = null, $excpt = null, 1);
$write = null;
$except = null;
$r = stream_select($read, $write, $excpt, 1);
if($r === false) {
$this->log_error("server", "select returned false");