[mythtv-commits] Ticket #5421: Incorrect handling of responses from mythlcdserver

MythTV mythtv at cvs.mythtv.org
Mon Jun 9 13:24:17 UTC 2008

#5421: Incorrect handling of responses from mythlcdserver
 Reporter:  dburr at fami.com.au  |       Owner:  ijr       
     Type:  defect             |      Status:  new       
 Priority:  minor              |   Milestone:  unknown   
Component:  mythtv             |     Version:  0.21-fixes
 Severity:  low                |     Mlocked:  0         
 As reported in the mailing list post at http://www.gossamer-
 threads.com/lists/mythtv/users/333605 some users are seeing "lcddevice:
 received bad no. of arguments in CONNECTED response from LCDServer" in
 their logs.  The reason for this is that libs/libmyth/lcddevice.cpp allows
 commands to be sent before it processes the response to the HELLO message.
 For example, assume that the following sequence of events was to take
 1. LCD::connectToHost() sends HELLO
 2. LCD::switchToTime() gets called and SWITCH_TO_TIME is sent
 3. readyReadThread_iffound() realises that data is available and calls

 The response string from the socket would then be read as something like
 "CONNECTED 16 2\r\nOK\r\n".  This will be split into an QStringList with 4
 elements "CONNECTED", "16", "2", "OK" which causes the warning to be
 output to the log file.

 This can be fixed in 2 ways:
 1. Don't send any commands until after the response to HELLO has been
 received and processed.
 2. Make LCD::readyRead() more robust and able to process multiple response

 The attached patches fix the problem in both ways for 0.21-fixes and
 trunk.  Note that this only fixes half of the problem described in the
 mailing list post.  The other half of the problem is that LCD server
 communication does not start appear to start when Myth starts.  Up until
 some time in the last few months I used to see a progress bar on the LCD
 when "Prescaling theme images" was done at startup.  Now I see the LCDproc
 display until I start navigating the Myth menus.

Ticket URL: <http://svn.mythtv.org/trac/ticket/5421>
MythTV <http://www.mythtv.org/>

More information about the mythtv-commits mailing list