Project

General

Profile

Actions

Bug #588

open

Error in Command function in svdrp.php under certein conditions - Change Request

Added by Anonymous about 13 years ago. Updated about 13 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Bugs
Target version:
Start date:
03/04/2011
Due date:
% Done:

100%

Estimated time:

Description

@alib and @TheTroll

I have a change request for svdrp.php. In some conditions, the Command function seems to fail when EPG infos are returned. In my case the fgets function did not notice eol and eof and so the whole SVDRP message was read over and over again, resulting in a server crash.

Here's my modification, according to the fact that the length parameter in the fgets function is optional and if you omit it, fgets will automatically determine the line size and read until eol.

Old:

function Command($cmd)
{
    ...
    while($s .= fgets($this->handle,2048))
    {
        $nline++;

        $this->DebugMessage($s);
        ...

New:

function Command($cmd)
{
    ...
    while(!feof($this->handle))
    {
        $s .= fgets($this->handle)
        $nline++;

        $this->DebugMessage($s);
        ...

Would be nice, if you would check it into the git repo. Thanks! ;-)

Greetz,
Holger

Actions #1

Updated by alib about 13 years ago

  • Status changed from New to Resolved
  • Assignee set to alib
  • % Done changed from 0 to 100

Added to git. Thanks for the patch.

Actions

Also available in: Atom PDF