Remove a deprecated function in BINKP and SocketClient
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 36s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m45s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
Deon George 2024-06-27 13:44:49 +10:00
parent 173446edbe
commit 00494cadfa
2 changed files with 2 additions and 50 deletions

View File

@ -1433,33 +1433,10 @@ final class Binkp extends BaseProtocol
} }
$wd = ($this->mqueue->count() || $this->tx_left || ($this->sessionGet(self::SE_SENDFILE) && $this->send->fd && ! $this->sessionGet(self::SE_WAITGET))); $wd = ($this->mqueue->count() || $this->tx_left || ($this->sessionGet(self::SE_SENDFILE) && $this->send->fd && ! $this->sessionGet(self::SE_WAITGET)));
$rd = TRUE;
try {
Log::debug(sprintf('%s:- Checking if there more data (ttySelect), timeout [%d]',self::LOGKEY,self::TIMEOUT_TIME));
// @todo we need to catch a timeout if there are no reads/writes
$rc = $this->client->ttySelect($rd,$wd,self::TIMEOUT_TIME);
Log::debug(sprintf('%s:- ttySelect returned [%d]',self::LOGKEY,$rc));
} catch (\Exception) {
$this->error_close();
$this->error = -2;
break;
}
$this->rc = ($this->originate ? (self::S_REDIAL|self::S_ADDTRY) : self::S_BUSY); $this->rc = ($this->originate ? (self::S_REDIAL|self::S_ADDTRY) : self::S_BUSY);
if ($rc === 0) { if (! $this->binkp_recv()) {
$this->error_close();
$this->error = -1;
break;
}
if ($rd && ! $this->binkp_recv()) {
Log::info(sprintf('%s:- BINKP finished reading',self::LOGKEY)); Log::info(sprintf('%s:- BINKP finished reading',self::LOGKEY));
break; break;

View File

@ -556,29 +556,4 @@ final class SocketClient {
{ {
return time()+$expire; return time()+$expire;
} }
/**
* See if there is data waiting to collect, or if we can send
*
* @param bool $read
* @param bool $write
* @param int $timeout
* @return int
* @throws \Exception
* @deprecated use canSend or hasData
*/
public function ttySelect(bool $read,bool $write, int $timeout): int
{
if ($this->rx_left) {
if (self::DEBUG)
Log::debug(sprintf('%s:= We still have [%d] chars in the RX buffer.',self::LOGKEY,$this->rx_left));
return 1;
}
$read = $read ? [$this->connection] : NULL;
$write = $write ? [$this->connection] : NULL;
return $this->socketSelect($read,$write,NULL,$timeout);
}
} }