Ticket #7885: mythweb_event.diff

File mythweb_event.diff, 839 bytes (added by xris, 10 years ago)

potentially better fix.

  • classes/MythBackend.php

     
    127127
    128128    public function sendCommand($command = null) {
    129129        $this->connect();
     130    // Flush the input buffer to clear out any unwanted events that might have shown up
     131        $this->receiveData(1);
     132    // The format should be <length + whitespace to 8 total bytes><data>
    130133        if (is_array($command))
    131134            $command = implode(MythBackend::$backend_separator, $command);
    132     // The format should be <length + whitespace to 8 total bytes><data>
    133135        $command = strlen($command) . str_repeat(' ', 8 - strlen(strlen($command))) . $command;
    134136        fputs($this->fp, $command);
    135137        return $this->receiveData();