Opened 9 years ago

Closed 9 years ago

#7885 closed defect (fixed)

Fix for mythweb after events were added to trunk

Reported by: Mike Riccio <mythtv at webdeck dot com> Owned by: Rob Smith
Priority: blocker Milestone: 0.23
Component: Plugin - MythWeb Version: head
Severity: high Keywords:
Cc: xris Ticket locked: no

Description

When the new event system was added to the trunk, it broke mythweb. The backend now sends a CLIENT_CONNECTED event to mythweb right after it connects, which mythweb was not expecting. This causes all sorts of strange behavior, including empty recording lists and upcoming schedules. This patch listens for the CLIENT_CONNECTED event right after connecting to the server. This seems somewhat fragile, but it is working for me.

Attachments (4)

mythweb.patch (428 bytes) - added by Mike Riccio <mythtv at webdeck dot com> 9 years ago.
One line patch
mythweb.2.patch (512 bytes) - added by Mike Riccio <mythtv at webdeck dot com> 9 years ago.
With full pathname - sorry.
mythweb.3.patch (568 bytes) - added by Mike Riccio <mythtv at webdeck dot com> 9 years ago.
Corrects missing braces.
mythweb_event.diff (839 bytes) - added by xris 9 years ago.
potentially better fix.

Download all attachments as: .zip

Change History (15)

Changed 9 years ago by Mike Riccio <mythtv at webdeck dot com>

Attachment: mythweb.patch added

One line patch

Changed 9 years ago by Mike Riccio <mythtv at webdeck dot com>

Attachment: mythweb.2.patch added

With full pathname - sorry.

comment:1 Changed 9 years ago by Stuart Auchterlonie

Milestone: unknown0.23
Priority: minorblocker

comment:2 Changed 9 years ago by Johnny Walker <johnnyjboss@…>

A) Shouldn't you add curly braces around that and the following line?

B) This patch - with or without the braces around it and the 'return true;' on the following line, do not fix my Upcoming Recordings screen which was working prior to a package update I did this morning.

comment:3 Changed 9 years ago by Mike Riccio <mythtv at webdeck dot com>

You are correct about the missing braces - good catch. Corrected patch attached. It works for me - what error are you seeing?

Changed 9 years ago by Mike Riccio <mythtv at webdeck dot com>

Attachment: mythweb.3.patch added

Corrects missing braces.

comment:4 Changed 9 years ago by Johnny Walker <johnnyjboss@…>

whoops - my schedule data was running out as of this morning - hence no upcoming recordings screen.

The fix with the curly braces works fine on my system. Thanks for finding this.

My system is MythBuntu? 9.10 using .22 Fixes repos.

comment:5 Changed 9 years ago by Johnny Walker <johnnyjboss@…>

Whoops again - I'm not using .23 - this fix breaks my system.

Please disregard as I wasn't having this issue.

comment:6 Changed 9 years ago by xris

This doesn't make much sense. Mythweb just ignores any event that it doesn't recognize. It looks more like unclaimed events in the communication buffer with the backend are interfering with future calls that look for data. e.g.

mythweb starts up, doesn't bother to look for CLIENT_CONNECTED, asks for upcoming recording data, and what it returns to the parser also includes the CLIENT_CONNECTED string

The problem with your patch is that CLIENT_CONNECTED isn't always returned, so on some systems this would cause a 120 second delay in page load. I'll look into a better fix for long term.

Changed 9 years ago by xris

Attachment: mythweb_event.diff added

potentially better fix.

comment:7 Changed 9 years ago by xris

Status: newinfoneeded_new

Added a potentially better fix. Let me know if this works for you -- my system doesn't manifest the problem, so I can only test that it doesn't break anything.

comment:8 in reply to:  7 Changed 9 years ago by anonymous

Replying to xris:

Added a potentially better fix. Let me know if this works for you -- my system doesn't manifest the problem, so I can only test that it doesn't break anything.

xris' change worked perfectly for me on trunk 23071

comment:9 Changed 9 years ago by xris

Cc: xris added

comment:10 Changed 9 years ago by Mike Riccio <mythtv at webdeck dot com>

xris's patch works for me as well. Thanks!

comment:11 Changed 9 years ago by xris

Resolution: fixed
Status: infoneeded_newclosed

(In [23503]) patch to fix #7885 -- not the best solution, but it seems to work for now

Note: See TracTickets for help on using tickets.