On 3 May 2010 02:27, Dave Topan <[email protected]> wrote:
> Migrating to a new server I was forced to upgrade to 0.23rc. Now I keep
> getting errors saying that the connection to mythtv was lost. I am
> assuming from previous threads that this is due to the protocol being
> changed. Please let me know what traces are needed to assist in resolving
> this.
Hi,
I recently upgraded to Mythbuntu 10.04 which follows the 0.23 branch,
and ran into this problem as well. When a recording is shown, the
connection is lost after some period of time.
I believe I have tracked it down to the fact that the mythtv protocol
has changed. The culprit seems to be the RECORDING_LIST_CHANGE
message. In order to improve performance for the mythtv frontend, this
message now has two alternatives. One is ADD which is not really a
problem for mvpmc since it will just be reported as an unknown
message. The other is UPDATE which poses a problem since it carries a
proginfo structure with it. Since mvpmc is unprepared for this, it
will end up in an undefined state and will disconnect when the next
myth backend message arrives.
I have attached a patch which works for me with Mythbuntu 10.04. I
haven't tried it with other versions, but I believe that it handles
the old RECORDING_LIST_CHANGE message correctly.
A dongle with the patch applied to the git HEAD can be downloaded from
http://www.grydholt.dk/dongle.bin.mvpmc. If you have the time please
check it out. If you run into any problems please run mvpmc with the
-M option and redirect the log output to a mount with plenty of room
and mail the log file to mailing list.
Best regards,
Jacob Grydholt
diff --git a/libs/libcmyth/event.c b/libs/libcmyth/event.c
index dbae33a..6ed5feb 100644
--- a/libs/libcmyth/event.c
+++ b/libs/libcmyth/event.c
@@ -54,7 +54,21 @@ cmyth_event_get(cmyth_conn_t conn, char
consumed = cmyth_rcv_string(conn, &err, tmp, sizeof(tmp) - 1, count);
count -= consumed;
- if (strcmp(tmp, "RECORDING_LIST_CHANGE") == 0) {
+ if (strcmp(tmp, "RECORDING_LIST_CHANGE UPDATE") == 0) {
+ event = CMYTH_EVENT_RECORDING_LIST_CHANGE;
+ /* receive a proginfo structure - do nothing with it (yet?)*/
+ proginfo = cmyth_proginfo_create();
+ if (!proginfo) {
+ cmyth_dbg(CMYTH_DBG_ERROR,
+ "%s: cmyth_proginfo_create() failed\n",
+ __FUNCTION__);
+ goto fail;
+ }
+ consumed = cmyth_rcv_proginfo(conn, &err, proginfo, count);
+ ref_release(proginfo);
+ proginfo = NULL;
+ count -= consumed;
+ } else if (strncmp(tmp, "RECORDING_LIST_CHANGE", 21) == 0) {
event = CMYTH_EVENT_RECORDING_LIST_CHANGE;
} else if (strcmp(tmp, "SCHEDULE_CHANGE") == 0) {
event = CMYTH_EVENT_SCHEDULE_CHANGE;
------------------------------------------------------------------------------
_______________________________________________
Mvpmc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mvpmc-users
mvpmc wiki: http://mvpmc.wikispaces.com/