fix clearTillPrompt for smbclient <=4.6

This commit is contained in:
Robin Appelman 2022-01-25 16:05:01 +01:00
commit 6327f1644c
5 changed files with 229 additions and 219 deletions

View file

@ -110,6 +110,13 @@ class RawConnection {
return $result;
}
public function flush() {
$meta = stream_get_meta_data($this->getOutputStream());
stream_set_blocking($this->getOutputStream(), false);
stream_get_contents($this->getOutputStream());
stream_set_blocking($this->getOutputStream(), $meta["blocked"]);
}
/**
* read output till the next prompt
*